Skip to content

Commit

Permalink
Fix test.py import of hypothesis.settings (#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdamien authored and dan-blanchard committed Apr 10, 2017
1 parent a74d589 commit 733e77c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from os.path import dirname, isdir, join, realpath, relpath, splitext

import hypothesis.strategies as st
from hypothesis import given, assume, Settings, Verbosity
from hypothesis import given, assume, settings, Verbosity
from nose.tools import eq_, assert_raises

import chardet
Expand Down Expand Up @@ -86,15 +86,15 @@ class JustALengthIssue(Exception):
@given(st.text(min_size=1), st.sampled_from(['ascii', 'utf-8', 'utf-16',
'utf-32', 'iso-8859-7',
'iso-8859-8', 'windows-1255']),
st.randoms(), settings=Settings(max_examples=200))
st.randoms(), settings=settings(max_examples=200))
def test_never_fails_to_detect_if_there_is_a_valid_encoding(txt, enc, rnd):
try:
data = txt.encode(enc)
except UnicodeEncodeError:
assume(False)
detected = chardet.detect(data)['encoding']
if detected is None:
@given(st.text(), settings=Settings(verbosity=Verbosity.quiet,
@given(st.text(), settings=settings(verbosity=Verbosity.quiet,
max_shrinks=0, max_examples=50),
random=rnd)
def string_poisons_following_text(suffix):
Expand Down

0 comments on commit 733e77c

Please sign in to comment.