Skip to content

Commit 3070096

Browse files
committed
Skip test if Python 2
1 parent 0cca86e commit 3070096

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

tests/test_trie.py

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -427,17 +427,20 @@ def test_trie_fuzzy():
427427
def test_trie_handles_long_alphabets():
428428
# https://github.com/pytries/datrie/issues/74
429429

430+
import sys
430431
import hypothesis.strategies as st
431432
from hypothesis import given
432433

433-
alphabet = [chr(i) for i in range(1500)]
434-
@given(st.lists(st.text(alphabet)))
435-
def _(xs):
436-
trie = datrie.Trie(alphabet)
437-
for x in xs:
438-
trie[x] = True
434+
sys.version_info > (2, ):
439435

440-
for x in xs:
441-
assert x in trie
436+
alphabet = [chr(i) for i in range(1500)]
437+
@given(st.lists(st.text(alphabet)))
438+
def _(xs):
439+
trie = datrie.Trie(alphabet)
440+
for x in xs:
441+
trie[x] = True
442442

443-
_()
443+
for x in xs:
444+
assert x in trie
445+
446+
_()

0 commit comments

Comments
 (0)