You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 18c2a59
Browse filesBrowse the repository at this point in the historyBrowse files
In 6.156.0, Hypothesis stopped providing PyPy 3.10 wheels. This
conditionalizes our use so we can completely avoid it when needed. It
seems like Hypothesis might be on the bleeding edge of build tools etc,
so we may need this in the future for other trailing edge environments.
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
2
+
# For details: https://github.com/coveragepy/coveragepy/blob/main/NOTICE.txt
3
+
4
+
"""A Hypothesis wrapper so we can turn it off completely in environments it doesn't support."""
5
+
6
+
from __future__ importannotations
7
+
8
+
fromtypingimportAny
9
+
10
+
importpytest
11
+
12
+
fromtestsimporttestenv
13
+
14
+
# pylint: disable=useless-import-alias
15
+
# pylint: disable=unused-import
16
+
17
+
iftestenv.USE_HYPOTHESIS:
18
+
fromhypothesisimport (
19
+
exampleasexample,
20
+
givenasgiven,
21
+
settingsassettings,
22
+
)
23
+
fromhypothesis.strategiesimport (
24
+
integersasintegers,
25
+
setsassets,
26
+
)
27
+
else:
28
+
29
+
def_skip(*_args: Any, **_kwargs: Any) ->Any:
30
+
"""A dummy decorator to skip hypothesis tests."""
31
+
returnpytest.mark.skip("Hypothesis isn't supported in this environment")
0 commit comments