Skip to content

Commit

Permalink
Fix flaky failure of test_can_run_with_no_db
Browse files Browse the repository at this point in the history
  • Loading branch information
Zalathar committed May 29, 2021
1 parent c69cad6 commit 15f95f6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions hypothesis-python/tests/cover/test_stateful.py
Expand Up @@ -24,6 +24,7 @@
from hypothesis.control import current_build_context
from hypothesis.database import ExampleDatabase
from hypothesis.errors import DidNotReproduce, Flaky, InvalidArgument, InvalidDefinition
from hypothesis.internal.entropy import deterministic_PRNG
from hypothesis.stateful import (
Bundle,
RuleBasedStateMachine,
Expand Down Expand Up @@ -384,8 +385,9 @@ def test_saves_failing_example_in_database():


def test_can_run_with_no_db():
with raises(AssertionError):
run_state_machine_as_test(DepthMachine, settings=Settings(database=None))
with deterministic_PRNG():
with raises(AssertionError):
run_state_machine_as_test(DepthMachine, settings=Settings(database=None))


def test_stateful_double_rule_is_forbidden(recwarn):
Expand Down

0 comments on commit 15f95f6

Please sign in to comment.