Debian Codegraph @

testing/web-platform/tests/tools/conftest.py

raw
1 # mypy: disable-error-code="no-untyped-def"
2
3 import platform
4 import os
5
6 from hypothesis import settings, HealthCheck
7
8 impl = platform.python_implementation()
9
10 settings.register_profile("ci", settings(max_examples=1000,
11 deadline=None,
12 suppress_health_check=[HealthCheck.too_slow]))
13 settings.register_profile("pypy", settings(deadline=None,
14 suppress_health_check=[HealthCheck.too_slow]))
15
16 settings.load_profile(os.getenv("HYPOTHESIS_PROFILE",
17 "default" if impl != "PyPy" else "pypy"))
18
19
20 def pytest_ignore_collect(collection_path, config):
21 # ignore directories which have their own tox.ini
22 assert collection_path != config.rootpath
23 if (collection_path / "tox.ini").is_file():
24 return True
25
26 return None