mirror of
https://github.com/correl/tornado-openapi3.git
synced 2024-12-27 11:09:53 +00:00
Disable deadline in hypothesis profiles
The deadline was not being overridden as described in the README, as the default profile is not mutable. This registers an additional CI profile disabling the deadline.
This commit is contained in:
parent
c7cc5ab05d
commit
2b57d71113
2 changed files with 7 additions and 4 deletions
|
@ -125,7 +125,7 @@ take a long time to run on slower computers. Two profiles are defined for
|
|||
Hypothesis to use which can be selected by setting the ``HYPOTHESIS_PROFILE``
|
||||
environment variable to one of the following values:
|
||||
|
||||
``default``
|
||||
``ci``
|
||||
Runs tests using the default Hypothesis settings (100 examples per test) and
|
||||
no completion deadline.
|
||||
|
||||
|
|
|
@ -2,6 +2,9 @@ import os
|
|||
|
||||
from hypothesis import settings
|
||||
|
||||
settings(deadline=None)
|
||||
settings.register_profile("dev", max_examples=10)
|
||||
settings.load_profile(os.getenv("HYPOTHESIS_PROFILE", "default"))
|
||||
settings.register_profile("ci", deadline=None)
|
||||
settings.register_profile("dev", deadline=None, max_examples=10)
|
||||
|
||||
settings.load_profile(
|
||||
os.getenv("HYPOTHESIS_PROFILE", "ci" if os.getenv("CI") else "default")
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue