File tree 3 files changed +32
-2
lines changed
3 files changed +32
-2
lines changed Original file line number Diff line number Diff line change 5
5
New Features
6
6
------------
7
7
8
- * The ``pytest-warnings `` plugin has been integrated into the core, so now ``pytest `` automatically
8
+ * The ``pytest-warnings `` plugin has been integrated into the core and now ``pytest `` automatically
9
9
captures and displays warnings at the end of the test session.
10
+
11
+ .. warning ::
12
+
13
+ This feature may disrupt test suites which apply and treat warnings themselves, and can be
14
+ disabled in your ``pytest.ini ``:
15
+
16
+ .. code-block :: ini
17
+
18
+ [pytest]
19
+ addopts = -p no:warnings
20
+
21
+ See the `warnings documentation page <https://docs.pytest.org/en/latest/warnings.html >`_ for more
22
+ information.
23
+
10
24
Thanks `@nicoddemus `_ for the PR.
11
25
12
- * Added ``junit_suite_name `` ini option to specify root `<testsuite> ` name for JUnit XML reports (`#533 `_).
26
+ * Added ``junit_suite_name `` ini option to specify root `` <testsuite> ` ` name for JUnit XML reports (`#533 `_).
13
27
14
28
* Added an ini option ``doctest_encoding `` to specify which encoding to use for doctest files.
15
29
Thanks `@wheerd `_ for the PR (`#2101 `_).
Original file line number Diff line number Diff line change @@ -5,6 +5,20 @@ Warnings Capture
5
5
6
6
.. versionadded :: 3.1
7
7
8
+ .. warning ::
9
+ pytest captures all warnings between tests, which prevents custom warning
10
+ filters in existing test suites from working. If this causes problems to your test suite,
11
+ this plugin can be disabled in your ``pytest.ini `` file with:
12
+
13
+ .. code-block :: ini
14
+
15
+ [pytest]
16
+ addopts = -p no:warnings
17
+
18
+ There's an ongoing discussion about this on `#2430
19
+ <https://github.com/pytest-dev/pytest/issues/2430> `_.
20
+
21
+
8
22
Starting from version ``3.1 ``, pytest now automatically catches all warnings during test execution
9
23
and displays them at the end of the session::
10
24
Original file line number Diff line number Diff line change @@ -46,6 +46,8 @@ commands=
46
46
47
47
48
48
[testenv:linting]
49
+ skipsdist =True
50
+ usedevelop =True
49
51
basepython = python2.7
50
52
# needed to keep check-manifest working
51
53
setenv =
You can’t perform that action at this time.
0 commit comments