2018-06-19 16:41:04 +08:00
|
|
|
[build-system]
|
|
|
|
requires = [
|
2018-10-15 03:44:32 +08:00
|
|
|
# sync with setup.py until we discard non-pep-517/518
|
2020-08-01 05:17:12 +08:00
|
|
|
"setuptools>=42.0",
|
2020-08-01 12:44:44 +08:00
|
|
|
"setuptools-scm[toml]>=3.4",
|
2018-06-19 16:41:04 +08:00
|
|
|
"wheel",
|
|
|
|
]
|
2019-02-09 01:50:33 +08:00
|
|
|
build-backend = "setuptools.build_meta"
|
2018-06-19 16:41:04 +08:00
|
|
|
|
2020-08-01 02:46:02 +08:00
|
|
|
[tool.setuptools_scm]
|
|
|
|
write_to = "src/_pytest/_version.py"
|
|
|
|
|
2020-06-08 21:03:10 +08:00
|
|
|
[tool.pytest.ini_options]
|
|
|
|
minversion = "2.0"
|
|
|
|
addopts = "-rfEX -p pytester --strict-markers"
|
2020-09-20 02:56:52 +08:00
|
|
|
python_files = ["test_*.py", "*_test.py", "testing/python/*.py"]
|
2020-06-08 21:03:10 +08:00
|
|
|
python_classes = ["Test", "Acceptance"]
|
|
|
|
python_functions = ["test"]
|
|
|
|
# NOTE: "doc" is not included here, but gets tested explicitly via "doctesting".
|
|
|
|
testpaths = ["testing"]
|
|
|
|
norecursedirs = ["testing/example_scripts"]
|
|
|
|
xfail_strict = true
|
|
|
|
filterwarnings = [
|
|
|
|
"error",
|
|
|
|
"default:Using or importing the ABCs:DeprecationWarning:unittest2.*",
|
2020-11-05 22:08:54 +08:00
|
|
|
# produced by older pyparsing<=2.2.0.
|
|
|
|
"default:Using or importing the ABCs:DeprecationWarning:pyparsing.*",
|
2020-06-08 21:03:10 +08:00
|
|
|
"default:the imp module is deprecated in favour of importlib:DeprecationWarning:nose.*",
|
2021-03-27 21:37:34 +08:00
|
|
|
# distutils is deprecated in 3.10, scheduled for removal in 3.12
|
|
|
|
"ignore:The distutils package is deprecated:DeprecationWarning",
|
2020-06-08 21:03:10 +08:00
|
|
|
# produced by python3.6/site.py itself (3.6.7 on Travis, could not trigger it with 3.6.8)."
|
|
|
|
"ignore:.*U.*mode is deprecated:DeprecationWarning:(?!(pytest|_pytest))",
|
|
|
|
# produced by pytest-xdist
|
|
|
|
"ignore:.*type argument to addoption.*:DeprecationWarning",
|
2020-10-19 15:02:36 +08:00
|
|
|
# produced on execnet (pytest-xdist)
|
2020-06-08 21:03:10 +08:00
|
|
|
"ignore:.*inspect.getargspec.*deprecated, use inspect.signature.*:DeprecationWarning",
|
|
|
|
# pytest's own futurewarnings
|
|
|
|
"ignore::pytest.PytestExperimentalApiWarning",
|
|
|
|
# Do not cause SyntaxError for invalid escape sequences in py37.
|
|
|
|
# Those are caught/handled by pyupgrade, and not easy to filter with the
|
|
|
|
# module being the filename (with .py removed).
|
|
|
|
"default:invalid escape sequence:DeprecationWarning",
|
|
|
|
# ignore use of unregistered marks, because we use many to test the implementation
|
|
|
|
"ignore::_pytest.warning_types.PytestUnknownMarkWarning",
|
2021-04-14 17:31:28 +08:00
|
|
|
# https://github.com/benjaminp/six/issues/341
|
|
|
|
"ignore:_SixMetaPathImporter\\.exec_module\\(\\) not found; falling back to load_module\\(\\):ImportWarning",
|
|
|
|
# https://github.com/benjaminp/six/pull/352
|
|
|
|
"ignore:_SixMetaPathImporter\\.find_spec\\(\\) not found; falling back to find_module\\(\\):ImportWarning",
|
|
|
|
# https://github.com/pypa/setuptools/pull/2517
|
|
|
|
"ignore:VendorImporter\\.find_spec\\(\\) not found; falling back to find_module\\(\\):ImportWarning",
|
|
|
|
# https://github.com/pytest-dev/execnet/pull/127
|
|
|
|
"ignore:isSet\\(\\) is deprecated, use is_set\\(\\) instead:DeprecationWarning",
|
2020-06-08 21:03:10 +08:00
|
|
|
]
|
|
|
|
pytester_example_dir = "testing/example_scripts"
|
|
|
|
markers = [
|
|
|
|
# dummy markers for testing
|
|
|
|
"foo",
|
|
|
|
"bar",
|
|
|
|
"baz",
|
|
|
|
# conftest.py reorders tests moving slow ones to the end of the list
|
|
|
|
"slow",
|
|
|
|
# experimental mark for all tests using pexpect
|
|
|
|
"uses_pexpect",
|
|
|
|
]
|
|
|
|
|
|
|
|
|
2017-05-30 21:54:15 +08:00
|
|
|
[tool.towncrier]
|
|
|
|
package = "pytest"
|
2018-06-05 09:01:23 +08:00
|
|
|
package_dir = "src"
|
2019-11-25 11:06:30 +08:00
|
|
|
filename = "doc/en/changelog.rst"
|
2017-05-30 21:54:15 +08:00
|
|
|
directory = "changelog/"
|
2018-07-27 20:21:18 +08:00
|
|
|
title_format = "pytest {version} ({project_date})"
|
2017-05-30 21:54:15 +08:00
|
|
|
template = "changelog/_template.rst"
|
|
|
|
|
|
|
|
[[tool.towncrier.type]]
|
2019-12-06 19:47:39 +08:00
|
|
|
directory = "breaking"
|
|
|
|
name = "Breaking Changes"
|
2018-09-14 01:02:01 +08:00
|
|
|
showcontent = true
|
|
|
|
|
|
|
|
[[tool.towncrier.type]]
|
|
|
|
directory = "deprecation"
|
|
|
|
name = "Deprecations"
|
2017-05-30 21:54:15 +08:00
|
|
|
showcontent = true
|
|
|
|
|
|
|
|
[[tool.towncrier.type]]
|
|
|
|
directory = "feature"
|
|
|
|
name = "Features"
|
|
|
|
showcontent = true
|
|
|
|
|
2019-08-10 20:26:37 +08:00
|
|
|
[[tool.towncrier.type]]
|
|
|
|
directory = "improvement"
|
|
|
|
name = "Improvements"
|
|
|
|
showcontent = true
|
|
|
|
|
2017-05-30 21:54:15 +08:00
|
|
|
[[tool.towncrier.type]]
|
|
|
|
directory = "bugfix"
|
|
|
|
name = "Bug Fixes"
|
|
|
|
showcontent = true
|
|
|
|
|
|
|
|
[[tool.towncrier.type]]
|
|
|
|
directory = "vendor"
|
|
|
|
name = "Vendored Libraries"
|
|
|
|
showcontent = true
|
|
|
|
|
|
|
|
[[tool.towncrier.type]]
|
|
|
|
directory = "doc"
|
|
|
|
name = "Improved Documentation"
|
|
|
|
showcontent = true
|
|
|
|
|
|
|
|
[[tool.towncrier.type]]
|
|
|
|
directory = "trivial"
|
2017-06-23 23:30:29 +08:00
|
|
|
name = "Trivial/Internal Changes"
|
|
|
|
showcontent = true
|
2020-03-07 09:18:41 +08:00
|
|
|
|
|
|
|
[tool.black]
|
2020-10-03 04:09:35 +08:00
|
|
|
target-version = ['py36']
|