Debian Codegraph @

contrib/python-zstandard/tests/conftest.py

raw
1 import os
2
3 try:
4 import hypothesis # type: ignore
5 except ImportError:
6 hypothesis = None # type: ignore
7
8
9 if hypothesis:
10 default_settings = hypothesis.settings(deadline=10000)
11 hypothesis.settings.register_profile("default", default_settings)
12
13 ci_settings = hypothesis.settings(deadline=20000, max_examples=1000)
14 hypothesis.settings.register_profile("ci", ci_settings)
15
16 expensive_settings = hypothesis.settings(deadline=None, max_examples=10000)
17 hypothesis.settings.register_profile("expensive", expensive_settings)
18
19 hypothesis.settings.load_profile(
20 os.environ.get("HYPOTHESIS_PROFILE", "default")
21 )