Debian Codegraph @

hypothesis-python/tests/nocover/test_given_error_conditions.py

raw
1 # This file is part of Hypothesis, which may be found at
2 # https://github.com/HypothesisWorks/hypothesis/
3 #
4 # Copyright the Hypothesis Authors.
5 # Individual contributors are listed in AUTHORS.rst and the git log.
6 #
7 # This Source Code Form is subject to the terms of the Mozilla Public License,
8 # v. 2.0. If a copy of the MPL was not distributed with this file, You can
9 # obtain one at https://mozilla.org/MPL/2.0/.
10
11 from hypothesis import HealthCheck, given, reject, settings
12 from hypothesis.errors import Unsatisfiable
13 from hypothesis.strategies import integers
14
15 from tests.common.utils import fails_with
16
17
18 @fails_with(Unsatisfiable)
19 @given(integers())
20 @settings(max_examples=50, suppress_health_check=list(HealthCheck))
21 def test_raises_unsatisfiable_if_all_false(x):
22 reject()