diff options
author | neiljp (Neil Pilgrim) <github@kepier.clara.net> | 2023-03-20 10:08:32 -0700 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2023-03-20 17:31:46 -0400 |
commit | 67b9e6c9b8422ddb20ebc6c637f058de5519df01 (patch) | |
tree | 8b97032966cf50a2d844e0ac8396ac1d53af9f83 | |
parent | 4024ef48612f3c2d20f320ee19b8724d19704bc0 (diff) | |
download | python-coveragepy-git-67b9e6c9b8422ddb20ebc6c637f058de5519df01.tar.gz |
build: Migrate pytest configuration to pyproject.toml.
-rw-r--r-- | pyproject.toml | 26 | ||||
-rw-r--r-- | setup.cfg | 23 |
2 files changed, 26 insertions, 23 deletions
diff --git a/pyproject.toml b/pyproject.toml index e11a5af1..6b02c6a4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,6 +28,32 @@ exclude = """(?x)( | ^tests/balance_xdist_plugin\\.py$ # not part of our test suite. )""" +[tool.pytest.ini_options] +addopts = "-q -n auto -p no:legacypath --strict-markers --no-flaky-report -rfEX --failed-first" +python_classes = "*Test" +markers = [ + "expensive: too slow to run during \"make smoke\"", +] + +# How come these warnings are suppressed successfully here, but not in conftest.py?? +filterwarnings = [ + "ignore:the imp module is deprecated in favour of importlib:DeprecationWarning", + "ignore:distutils Version classes are deprecated:DeprecationWarning", + "ignore:The distutils package is deprecated and slated for removal in Python 3.12:DeprecationWarning", +] + +# xfail tests that pass should fail the test suite +xfail_strict = true + +balanced_clumps = [ + # Because of expensive session-scoped fixture: + "VirtualenvTest", + # Because of shared-file manipulations (~/tests/actual/testing): + "CompareTest", + # No idea why this one fails if run on separate workers: + "GetZipBytesTest", +] + [tool.scriv] # Changelog management: https://pypi.org/project/scriv/ format = "rst" @@ -1,28 +1,5 @@ # Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 # For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt -[tool:pytest] -addopts = -q -n auto -p no:legacypath --strict-markers --no-flaky-report -rfEX --failed-first -python_classes = *Test -markers = - expensive: too slow to run during "make smoke" - -# How come these warnings are suppressed successfully here, but not in conftest.py?? -filterwarnings = - ignore:the imp module is deprecated in favour of importlib:DeprecationWarning - ignore:distutils Version classes are deprecated:DeprecationWarning - ignore:The distutils package is deprecated and slated for removal in Python 3.12:DeprecationWarning - -# xfail tests that pass should fail the test suite -xfail_strict = true - -balanced_clumps = - ; Because of expensive session-scoped fixture: - VirtualenvTest - ; Because of shared-file manipulations (~/tests/actual/testing): - CompareTest - ; No idea why this one fails if run on separate workers: - GetZipBytesTest - [metadata] license_files = LICENSE.txt |