Skip to content

Commit

Permalink
add @checks_deprecated_behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
reaganjlee committed Apr 13, 2023
1 parent 9f10ed3 commit 39824a3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions hypothesis-python/tests/cover/test_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@
from hypothesis.stateful import RuleBasedStateMachine, rule
from hypothesis.utils.conventions import not_set

from tests.common.utils import counts_calls, fails_with, validate_deprecation

from tests.common.utils import checks_deprecated_behaviour, counts_calls, fails_with, validate_deprecation

def test_has_docstrings():
assert settings.verbosity.__doc__
Expand Down Expand Up @@ -491,8 +490,10 @@ def test_deprecated_settings_warn_on_set_settings():
with validate_deprecation():
settings(suppress_health_check=[HealthCheck.not_a_test_method])


@checks_deprecated_behaviour
def test_deprecated_settings_not_in_settings_all_list():
al = HealthCheck.all()
ls = list(HealthCheck)
assert al == ls
assert HealthCheck.return_value not in ls
assert HealthCheck.not_a_test_method not in ls

0 comments on commit 39824a3

Please sign in to comment.