Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix test.py import of hypothesis.settings #97

Merged
merged 1 commit into from
Apr 10, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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