Automatic update from web-platform-tests Bump pytest from 7.4.4 to 8.2.1 in /tools (#46383) * --- updated-dependencies: - dependency-name: pytest dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * Remove vendored pytest * Squashed 'tools/third_party/pytest/' content from commit 66ff8dffdf9 git-subtree-dir: tools/third_party/pytest git-subtree-split: 66ff8dffdf9eee9b3dd6686de34542c49ff80dcd * Remove unused py library * Update resources tests to work with pytest 8 The single class implementing both a test collector and a test item no longer works; these need to be split into separate classes. * Update pytest_ignore_collect argument for pytest 8 * Update pytest-cov to 5.0.0 * Remove old attrs library * Squashed 'tools/third_party/attrs/' content from commit 9e443b18527 git-subtree-dir: tools/third_party/attrs git-subtree-split: 9e443b18527dc96b194e92805fa751cbf8434ba9 * Remove vendored pluggy * Fix log message formatting * Squashed 'tools/third_party/pluggy/' content from commit f8aa4a00971 git-subtree-dir: tools/third_party/pluggy git-subtree-split: f8aa4a009716a7994f2f6c1947d9fa69feccbdd5 * Add exceptiongroup library for Python < 3.11 * Readd _version.py file for pytest * Reset internal state of Stash class in unit tests * Fix indent in conftest.py --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: James Graham <james@hoppipolla.co.uk> -- wpt-commits: cecc16187e8129eab6e4d2e35f999efc6fd149df wpt-pr: 46383
27 lines
879 B
Python
27 lines
879 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, 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
|