Files
tubestation/testing/web-platform/tests/tools/conftest.py
moz-wptsync-bot d32cd0b8ee Bug 1831178 [wpt PR 39829] - Make pytest raise warnings as errors by default, a=testonly
Automatic update from web-platform-tests
Make pytest raise warnings as errors by default

--

wpt-commits: 5712247ae2932bc1f896287eaaa8a8a016ed85cd
wpt-pr: 39829
2023-05-21 22:45:13 +00:00

27 lines
885 B
Python

# mypy: disable-error-code="no-untyped-def"
import platform
import os
from hypothesis import settings, HealthCheck
impl = platform.python_implementation()
settings.register_profile("ci", settings(max_examples=1000,
deadline=None,
suppress_health_check=[HealthCheck.too_slow]))
settings.register_profile("pypy", settings(deadline=None,
suppress_health_check=[HealthCheck.too_slow]))
settings.load_profile(os.getenv("HYPOTHESIS_PROFILE",
"default" if impl != "PyPy" else "pypy"))
def pytest_ignore_collect(collection_path, path, config):
# ignore directories which have their own tox.ini
assert collection_path != config.rootpath
if (collection_path / "tox.ini").is_file():
return True
return None