File tree Expand file tree Collapse file tree 2 files changed +4
-14
lines changed Expand file tree Collapse file tree 2 files changed +4
-14
lines changed Original file line number Diff line number Diff line change
1
+ Move some Hypothesis support into Trio itself, via the new plugins system.
2
+ As a result, ``pytest-trio `` will not import Hypothesis, while still
3
+ integrating seamlessly if _you_ import it.
Original file line number Diff line number Diff line change 1
1
"""pytest-trio implementation."""
2
+
2
3
import sys
3
4
from functools import wraps , partial
4
5
from collections .abc import Coroutine , Generator
19
20
# Basic setup
20
21
################################################################
21
22
22
- try :
23
- from hypothesis import register_random
24
- except ImportError : # pragma: no cover
25
- pass
26
- else :
27
- # On recent versions of Hypothesis, make the Trio scheduler deterministic
28
- # even though it uses a module-scoped Random instance. This works
29
- # regardless of whether or not the random_module strategy is used.
30
- register_random (trio ._core ._run ._r )
31
- # We also have to enable determinism, which is disabled by default
32
- # due to a small performance impact - but fine to enable in testing.
33
- # See https://github.com/python-trio/trio/pull/890/ for details.
34
- trio ._core ._run ._ALLOW_DETERMINISTIC_SCHEDULING = True
35
-
36
23
37
24
def pytest_addoption (parser ):
38
25
parser .addini (
You can’t perform that action at this time.
0 commit comments