Skip to content

Commit

Permalink
Skip test if Python 2
Browse files Browse the repository at this point in the history
  • Loading branch information
c4f3a0ce committed Dec 8, 2019
1 parent 0cca86e commit 3b09cbb
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions tests/test_trie.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,17 +427,20 @@ def test_trie_fuzzy():
def test_trie_handles_long_alphabets():
# https://github.com/pytries/datrie/issues/74

import sys
import hypothesis.strategies as st
from hypothesis import given

alphabet = [chr(i) for i in range(1500)]
@given(st.lists(st.text(alphabet)))
def _(xs):
trie = datrie.Trie(alphabet)
for x in xs:
trie[x] = True
if sys.version_info > (2, ):

for x in xs:
assert x in trie
alphabet = [chr(i) for i in range(1500)]
@given(st.lists(st.text(alphabet)))
def _(xs):
trie = datrie.Trie(alphabet)
for x in xs:
trie[x] = True

_()
for x in xs:
assert x in trie

_()

0 comments on commit 3b09cbb

Please sign in to comment.