Skip to content

Commit

Permalink
De-flake verbosity test
Browse files Browse the repository at this point in the history
  • Loading branch information
Zac-HD committed Jun 4, 2019
1 parent b0408de commit 040b75b
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions hypothesis-python/tests/cover/test_verbosity.py
Expand Up @@ -23,6 +23,7 @@
from hypothesis._settings import Verbosity, settings
from hypothesis.reporting import default as default_reporter, with_reporter
from hypothesis.strategies import booleans, integers, lists
from tests.common.debug import minimal
from tests.common.utils import capture_out, fails


Expand Down Expand Up @@ -60,16 +61,11 @@ def test_foo(x):

def test_includes_progress_in_verbose_mode():
with capture_verbosity() as o:

def foo():
find(
lists(integers()),
lambda x: sum(x) >= 100,
settings=settings(verbosity=Verbosity.verbose, database=None),
)

foo()

minimal(
lists(integers(), min_size=1),
lambda x: sum(x) >= 100,
settings(verbosity=Verbosity.verbose),
)
out = o.getvalue()
assert out
assert u"Shrunk example" in out
Expand Down

0 comments on commit 040b75b

Please sign in to comment.