Debian Codegraph @

hypothesis-python/tests/nocover/test_unusual_settings_configs.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, Verbosity, assume, given, settings, strategies as st
12
13
14 @settings(max_examples=1, database=None)
15 @given(st.integers())
16 def test_single_example(n):
17 pass
18
19
20 @settings(
21 max_examples=1,
22 database=None,
23 suppress_health_check=[HealthCheck.filter_too_much, HealthCheck.too_slow],
24 verbosity=Verbosity.debug,
25 )
26 @given(st.integers())
27 def test_hard_to_find_single_example(n):
28 # Numbers are arbitrary, just deliberately unlikely to hit this too soon.
29 assume(n % 50 == 11)