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 11"""pytest-trio implementation."""
2+
23import sys
34from functools import wraps , partial
45from collections .abc import Coroutine , Generator
1920# Basic setup
2021################################################################
2122
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-
3623
3724def pytest_addoption (parser ):
3825 parser .addini (
You can’t perform that action at this time.
0 commit comments