@@ -7,6 +7,49 @@ requires = [
7
7
]
8
8
build-backend = " setuptools.build_meta"
9
9
10
+ [tool .pytest .ini_options ]
11
+ minversion = " 2.0"
12
+ addopts = " -rfEX -p pytester --strict-markers"
13
+ python_files = [" test_*.py" , " *_test.py" , " testing/*/*.py" ]
14
+ python_classes = [" Test" , " Acceptance" ]
15
+ python_functions = [" test" ]
16
+ # NOTE: "doc" is not included here, but gets tested explicitly via "doctesting".
17
+ testpaths = [" testing" ]
18
+ norecursedirs = [" testing/example_scripts" ]
19
+ xfail_strict = true
20
+ filterwarnings = [
21
+ " error" ,
22
+ " default:Using or importing the ABCs:DeprecationWarning:unittest2.*" ,
23
+ " default:the imp module is deprecated in favour of importlib:DeprecationWarning:nose.*" ,
24
+ " ignore:Module already imported so cannot be rewritten:pytest.PytestWarning" ,
25
+ # produced by python3.6/site.py itself (3.6.7 on Travis, could not trigger it with 3.6.8)."
26
+ " ignore:.*U.*mode is deprecated:DeprecationWarning:(?!(pytest|_pytest))" ,
27
+ # produced by pytest-xdist
28
+ " ignore:.*type argument to addoption.*:DeprecationWarning" ,
29
+ # produced by python >=3.5 on execnet (pytest-xdist)
30
+ " ignore:.*inspect.getargspec.*deprecated, use inspect.signature.*:DeprecationWarning" ,
31
+ # pytest's own futurewarnings
32
+ " ignore::pytest.PytestExperimentalApiWarning" ,
33
+ # Do not cause SyntaxError for invalid escape sequences in py37.
34
+ # Those are caught/handled by pyupgrade, and not easy to filter with the
35
+ # module being the filename (with .py removed).
36
+ " default:invalid escape sequence:DeprecationWarning" ,
37
+ # ignore use of unregistered marks, because we use many to test the implementation
38
+ " ignore::_pytest.warning_types.PytestUnknownMarkWarning" ,
39
+ ]
40
+ pytester_example_dir = " testing/example_scripts"
41
+ markers = [
42
+ # dummy markers for testing
43
+ " foo" ,
44
+ " bar" ,
45
+ " baz" ,
46
+ # conftest.py reorders tests moving slow ones to the end of the list
47
+ " slow" ,
48
+ # experimental mark for all tests using pexpect
49
+ " uses_pexpect" ,
50
+ ]
51
+
52
+
10
53
[tool .towncrier ]
11
54
package = " pytest"
12
55
package_dir = " src"
0 commit comments