diff --git a/CHANGELOG.rst b/CHANGELOG.rst index e9ac09c8e..76b6caf1b 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -18,6 +18,208 @@ with advance notice in the **Deprecations** section of releases. .. towncrier release notes start +pytest 5.3.0 (2019-11-19) +========================= + +Deprecations +------------ + +- `#6179 `_: The default value of ``junit_family`` option will change to ``xunit2`` in pytest 6.0, given + that this is the version supported by default in modern tools that manipulate this type of file. + + In order to smooth the transition, pytest will issue a warning in case the ``--junitxml`` option + is given in the command line but ``junit_family`` is not explicitly configured in ``pytest.ini``. + + For more information, `see the docs `__. + + + +Features +-------- + +- `#4488 `_: The pytest team has created the `pytest-reportlog `__ + plugin, which provides a new ``--report-log=FILE`` option that writes *report logs* into a file as the test session executes. + + Each line of the report log contains a self contained JSON object corresponding to a testing event, + such as a collection or a test result report. The file is guaranteed to be flushed after writing + each line, so systems can read and process events in real-time. + + The plugin is meant to replace the ``--resultlog`` option, which is deprecated and meant to be removed + in a future release. If you use ``--resultlog``, please try out ``pytest-reportlog`` and + provide feedback. + + +- `#4730 `_: When ``sys.pycache_prefix`` (Python 3.8+) is set, it will be used by pytest to cache test files changed by the assertion rewriting mechanism. + + This makes it easier to benefit of cached ``.pyc`` files even on file systems without permissions. + + +- `#5515 `_: Allow selective auto-indentation of multiline log messages. + + Adds command line option ``--log-auto-indent``, config option + ``log_auto_indent`` and support for per-entry configuration of + indentation behavior on calls to ``logging.log()``. + + Alters the default for auto-indention from ``on`` to ``off``. This + restores the older behavior that existed prior to v4.6.0. This + reversion to earlier behavior was done because it is better to + activate new features that may lead to broken tests explicitly + rather than implicitly. + + +- `#5914 `_: ``pytester`` learned two new functions, `no_fnmatch_line `_ and + `no_re_match_line `_. + + The functions are used to ensure the captured text *does not* match the given + pattern. + + The previous idiom was to use ``re.match``: + + .. code-block:: python + + assert re.match(pat, result.stdout.str()) is None + + Or the ``in`` operator: + + .. code-block:: python + + assert text in result.stdout.str() + + But the new functions produce best output on failure. + + +- `#6057 `_: Add tolerances to complex values when printing ``pytest.approx``. + + For example, ``repr(pytest.approx(3+4j))`` returns ``(3+4j) ± 5e-06 ∠ ±180°``. This is polar notation indicating a circle around the expected value, with a radius of 5e-06. For ``approx`` comparisons to return ``True``, the actual value should fall within this circle. + + +- `#6061 `_: Adding the pluginmanager as an option ``pytest_addoption`` + so that hooks can be invoked when setting up command line options. This is + useful for having one plugin communicate things to another plugin, + such as default values or which set of command line options to add. + + + +Improvements +------------ + +- `#5061 `_: Use multiple colors with terminal summary statistics. + + +- `#5630 `_: Quitting from debuggers is now properly handled in ``doctest`` items. + + +- `#5924 `_: Improve verbose diff output with sequences. + + Before: + + .. code-block:: + + E AssertionError: assert ['version', '...version_info'] == ['version', '...version', ...] + E Right contains 3 more items, first extra item: ' ' + E Full diff: + E - ['version', 'version_info', 'sys.version', 'sys.version_info'] + E + ['version', + E + 'version_info', + E + 'sys.version', + E + 'sys.version_info', + E + ' ', + E + 'sys.version', + E + 'sys.version_info'] + + After: + + .. code-block:: + + E AssertionError: assert ['version', '...version_info'] == ['version', '...version', ...] + E Right contains 3 more items, first extra item: ' ' + E Full diff: + E [ + E 'version', + E 'version_info', + E 'sys.version', + E 'sys.version_info', + E + ' ', + E + 'sys.version', + E + 'sys.version_info', + E ] + + +- `#5936 `_: Display untruncated assertion message with ``-vv``. + + +- `#5990 `_: Fix plurality mismatch in test summary (e.g. display "1 error" instead of "1 errors"). + + +- `#6008 `_: ``Config.InvocationParams.args`` is now always a ``tuple`` to better convey that it should be + immutable and avoid accidental modifications. + + +- `#6023 `_: ``pytest.main`` returns a ``pytest.ExitCode`` instance now, except for when custom exit codes are used (where it returns ``int`` then still). + + +- `#6026 `_: Align prefixes in output of pytester's ``LineMatcher``. + + +- `#6059 `_: Collection errors are reported as errors (and not failures like before) in the terminal's short test summary. + + +- `#6069 `_: ``pytester.spawn`` does not skip/xfail tests on FreeBSD anymore unconditionally. + + +- `#6097 `_: The "[XXX%]" indicator in the test summary is colored according to the final (new) multi-colored line's main color. + + +- `#6116 `_: Add ``--co`` as a synonym to ``--collect-only``. + + +- `#6148 `_: ``atomicwrites`` is now only used on Windows, fixing a performance regression with assertion rewriting on Unix. + + +- `#6152 `_: Now parametrization will use the ``__name__`` attribute of any object for the id, if present. Previously it would only use ``__name__`` for functions and classes. + + +- `#6176 `_: Improved failure reporting with pytester's ``Hookrecorder.assertoutcome``. + + +- `#6181 `_: The reason for a stopped session, e.g. with ``--maxfail`` / ``-x`` gets reported. + + +- `#6206 `_: cacheprovider: improved robustness and performance with ``cache.set``. + + + +Bug Fixes +--------- + +- `#2049 `_: Fix ``-setup-plan`` showing inaccurate information about fixture lifetimes. + + +- `#2548 `_: Fix line offset mismatch with skipped tests in terminal summary. + + +- `#6039 `_: The ``PytestDoctestRunner`` is properly invalidated when unconfiguring the doctest plugin. + + This is important when used with ``pytester``'s ``runpytest_inprocess``. + + +- `#6047 `_: BaseExceptions are handled in ``saferepr``, which includes ``pytest.fail.Exception`` etc. + + +- `#6074 `_: pytester: fix order of arguments in ``rm_rf`` warning when cleaning up temporary directories, and do not emit warnings for errors with ``os.open``. + + +- `#6189 `_: Fix incorrect result of ``getmodpath`` method. + + + +Trivial/Internal Changes +------------------------ + +- `#4901 `_: ``RunResult`` from ``pytester`` now displays the mnemonic of the ``ret`` attribute when it is a + valid ``pytest.ExitCode`` value. + + pytest 5.2.4 (2019-11-15) ========================= diff --git a/changelog/2049.bugfix.rst b/changelog/2049.bugfix.rst deleted file mode 100644 index 395396bd3..000000000 --- a/changelog/2049.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -Fix ``-setup-plan`` showing inaccurate information about fixture lifetimes. diff --git a/changelog/2548.bugfix.rst b/changelog/2548.bugfix.rst deleted file mode 100644 index 8ee3b6462..000000000 --- a/changelog/2548.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -Fix line offset mismatch with skipped tests in terminal summary. diff --git a/changelog/4488.feature.rst b/changelog/4488.feature.rst deleted file mode 100644 index 1e0387f44..000000000 --- a/changelog/4488.feature.rst +++ /dev/null @@ -1,10 +0,0 @@ -The pytest team has created the `pytest-reportlog `__ -plugin, which provides a new ``--report-log=FILE`` option that writes *report logs* into a file as the test session executes. - -Each line of the report log contains a self contained JSON object corresponding to a testing event, -such as a collection or a test result report. The file is guaranteed to be flushed after writing -each line, so systems can read and process events in real-time. - -The plugin is meant to replace the ``--resultlog`` option, which is deprecated and meant to be removed -in a future release. If you use ``--resultlog``, please try out ``pytest-reportlog`` and -provide feedback. diff --git a/changelog/4730.feature.rst b/changelog/4730.feature.rst deleted file mode 100644 index 80d1c4a38..000000000 --- a/changelog/4730.feature.rst +++ /dev/null @@ -1,3 +0,0 @@ -When ``sys.pycache_prefix`` (Python 3.8+) is set, it will be used by pytest to cache test files changed by the assertion rewriting mechanism. - -This makes it easier to benefit of cached ``.pyc`` files even on file systems without permissions. diff --git a/changelog/4901.trivial.rst b/changelog/4901.trivial.rst deleted file mode 100644 index f6609ddf1..000000000 --- a/changelog/4901.trivial.rst +++ /dev/null @@ -1,2 +0,0 @@ -``RunResult`` from ``pytester`` now displays the mnemonic of the ``ret`` attribute when it is a -valid ``pytest.ExitCode`` value. diff --git a/changelog/5061.improvement.rst b/changelog/5061.improvement.rst deleted file mode 100644 index 9eb0c1cd3..000000000 --- a/changelog/5061.improvement.rst +++ /dev/null @@ -1 +0,0 @@ -Use multiple colors with terminal summary statistics. diff --git a/changelog/5515.feature.rst b/changelog/5515.feature.rst deleted file mode 100644 index b53097c43..000000000 --- a/changelog/5515.feature.rst +++ /dev/null @@ -1,11 +0,0 @@ -Allow selective auto-indentation of multiline log messages. - -Adds command line option ``--log-auto-indent``, config option -``log_auto_indent`` and support for per-entry configuration of -indentation behavior on calls to ``logging.log()``. - -Alters the default for auto-indention from ``on`` to ``off``. This -restores the older behavior that existed prior to v4.6.0. This -reversion to earlier behavior was done because it is better to -activate new features that may lead to broken tests explicitly -rather than implicitly. diff --git a/changelog/5630.improvement.rst b/changelog/5630.improvement.rst deleted file mode 100644 index 45d49bdae..000000000 --- a/changelog/5630.improvement.rst +++ /dev/null @@ -1 +0,0 @@ -Quitting from debuggers is now properly handled in ``doctest`` items. diff --git a/changelog/5914.feature.rst b/changelog/5914.feature.rst deleted file mode 100644 index 68cd66f99..000000000 --- a/changelog/5914.feature.rst +++ /dev/null @@ -1,19 +0,0 @@ -``pytester`` learned two new functions, `no_fnmatch_line `_ and -`no_re_match_line `_. - -The functions are used to ensure the captured text *does not* match the given -pattern. - -The previous idiom was to use ``re.match``: - -.. code-block:: python - - assert re.match(pat, result.stdout.str()) is None - -Or the ``in`` operator: - -.. code-block:: python - - assert text in result.stdout.str() - -But the new functions produce best output on failure. diff --git a/changelog/5924.improvement.rst b/changelog/5924.improvement.rst deleted file mode 100644 index a03eb4704..000000000 --- a/changelog/5924.improvement.rst +++ /dev/null @@ -1,34 +0,0 @@ -Improve verbose diff output with sequences. - -Before: - -.. code-block:: - - E AssertionError: assert ['version', '...version_info'] == ['version', '...version', ...] - E Right contains 3 more items, first extra item: ' ' - E Full diff: - E - ['version', 'version_info', 'sys.version', 'sys.version_info'] - E + ['version', - E + 'version_info', - E + 'sys.version', - E + 'sys.version_info', - E + ' ', - E + 'sys.version', - E + 'sys.version_info'] - -After: - -.. code-block:: - - E AssertionError: assert ['version', '...version_info'] == ['version', '...version', ...] - E Right contains 3 more items, first extra item: ' ' - E Full diff: - E [ - E 'version', - E 'version_info', - E 'sys.version', - E 'sys.version_info', - E + ' ', - E + 'sys.version', - E + 'sys.version_info', - E ] diff --git a/changelog/5936.improvement.rst b/changelog/5936.improvement.rst deleted file mode 100644 index c5cd924bb..000000000 --- a/changelog/5936.improvement.rst +++ /dev/null @@ -1 +0,0 @@ -Display untruncated assertion message with ``-vv``. diff --git a/changelog/5990.improvement.rst b/changelog/5990.improvement.rst deleted file mode 100644 index 6f5ad648e..000000000 --- a/changelog/5990.improvement.rst +++ /dev/null @@ -1 +0,0 @@ -Fix plurality mismatch in test summary (e.g. display "1 error" instead of "1 errors"). diff --git a/changelog/6008.improvement.rst b/changelog/6008.improvement.rst deleted file mode 100644 index 22ef35cc8..000000000 --- a/changelog/6008.improvement.rst +++ /dev/null @@ -1,2 +0,0 @@ -``Config.InvocationParams.args`` is now always a ``tuple`` to better convey that it should be -immutable and avoid accidental modifications. diff --git a/changelog/6023.improvement.rst b/changelog/6023.improvement.rst deleted file mode 100644 index 6cf81002e..000000000 --- a/changelog/6023.improvement.rst +++ /dev/null @@ -1 +0,0 @@ -``pytest.main`` returns a ``pytest.ExitCode`` instance now, except for when custom exit codes are used (where it returns ``int`` then still). diff --git a/changelog/6026.improvement.rst b/changelog/6026.improvement.rst deleted file mode 100644 index 34dfb278d..000000000 --- a/changelog/6026.improvement.rst +++ /dev/null @@ -1 +0,0 @@ -Align prefixes in output of pytester's ``LineMatcher``. diff --git a/changelog/6039.bugfix.rst b/changelog/6039.bugfix.rst deleted file mode 100644 index b13a677c8..000000000 --- a/changelog/6039.bugfix.rst +++ /dev/null @@ -1,3 +0,0 @@ -The ``PytestDoctestRunner`` is properly invalidated when unconfiguring the doctest plugin. - -This is important when used with ``pytester``'s ``runpytest_inprocess``. diff --git a/changelog/6047.bugfix.rst b/changelog/6047.bugfix.rst deleted file mode 100644 index 11a997f71..000000000 --- a/changelog/6047.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -BaseExceptions are handled in ``saferepr``, which includes ``pytest.fail.Exception`` etc. diff --git a/changelog/6057.feature.rst b/changelog/6057.feature.rst deleted file mode 100644 index b7334e7fe..000000000 --- a/changelog/6057.feature.rst +++ /dev/null @@ -1,3 +0,0 @@ -Add tolerances to complex values when printing ``pytest.approx``. - -For example, ``repr(pytest.approx(3+4j))`` returns ``(3+4j) ± 5e-06 ∠ ±180°``. This is polar notation indicating a circle around the expected value, with a radius of 5e-06. For ``approx`` comparisons to return ``True``, the actual value should fall within this circle. diff --git a/changelog/6059.improvement.rst b/changelog/6059.improvement.rst deleted file mode 100644 index 39ffff99b..000000000 --- a/changelog/6059.improvement.rst +++ /dev/null @@ -1 +0,0 @@ -Collection errors are reported as errors (and not failures like before) in the terminal's short test summary. diff --git a/changelog/6061.feature.rst b/changelog/6061.feature.rst deleted file mode 100644 index 11f548625..000000000 --- a/changelog/6061.feature.rst +++ /dev/null @@ -1,4 +0,0 @@ -Adding the pluginmanager as an option ``pytest_addoption`` -so that hooks can be invoked when setting up command line options. This is -useful for having one plugin communicate things to another plugin, -such as default values or which set of command line options to add. diff --git a/changelog/6069.improvement.rst b/changelog/6069.improvement.rst deleted file mode 100644 index e60d154bb..000000000 --- a/changelog/6069.improvement.rst +++ /dev/null @@ -1 +0,0 @@ -``pytester.spawn`` does not skip/xfail tests on FreeBSD anymore unconditionally. diff --git a/changelog/6074.bugfix.rst b/changelog/6074.bugfix.rst deleted file mode 100644 index 624cf5d1c..000000000 --- a/changelog/6074.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -pytester: fix order of arguments in ``rm_rf`` warning when cleaning up temporary directories, and do not emit warnings for errors with ``os.open``. diff --git a/changelog/6097.improvement.rst b/changelog/6097.improvement.rst deleted file mode 100644 index 32eb84906..000000000 --- a/changelog/6097.improvement.rst +++ /dev/null @@ -1 +0,0 @@ -The "[XXX%]" indicator in the test summary is colored according to the final (new) multi-colored line's main color. diff --git a/changelog/6116.improvement.rst b/changelog/6116.improvement.rst deleted file mode 100644 index 4fc96ec77..000000000 --- a/changelog/6116.improvement.rst +++ /dev/null @@ -1 +0,0 @@ -Add ``--co`` as a synonym to ``--collect-only``. diff --git a/changelog/6148.improvement.rst b/changelog/6148.improvement.rst deleted file mode 100644 index 3d77ab528..000000000 --- a/changelog/6148.improvement.rst +++ /dev/null @@ -1 +0,0 @@ -``atomicwrites`` is now only used on Windows, fixing a performance regression with assertion rewriting on Unix. diff --git a/changelog/6152.improvement.rst b/changelog/6152.improvement.rst deleted file mode 100644 index 8e5f4d52a..000000000 --- a/changelog/6152.improvement.rst +++ /dev/null @@ -1 +0,0 @@ -Now parametrization will use the ``__name__`` attribute of any object for the id, if present. Previously it would only use ``__name__`` for functions and classes. diff --git a/changelog/6176.improvement.rst b/changelog/6176.improvement.rst deleted file mode 100644 index 39787da2e..000000000 --- a/changelog/6176.improvement.rst +++ /dev/null @@ -1 +0,0 @@ -Improved failure reporting with pytester's ``Hookrecorder.assertoutcome``. diff --git a/changelog/6179.deprecation.rst b/changelog/6179.deprecation.rst deleted file mode 100644 index 97f7ec74b..000000000 --- a/changelog/6179.deprecation.rst +++ /dev/null @@ -1,7 +0,0 @@ -The default value of ``junit_family`` option will change to ``xunit2`` in pytest 6.0, given -that this is the version supported by default in modern tools that manipulate this type of file. - -In order to smooth the transition, pytest will issue a warning in case the ``--junitxml`` option -is given in the command line but ``junit_family`` is not explicitly configured in ``pytest.ini``. - -For more information, `see the docs `__. diff --git a/changelog/6181.improvement.rst b/changelog/6181.improvement.rst deleted file mode 100644 index 0960f6203..000000000 --- a/changelog/6181.improvement.rst +++ /dev/null @@ -1 +0,0 @@ -The reason for a stopped session, e.g. with ``--maxfail`` / ``-x`` gets reported. diff --git a/changelog/6189.bugfix.rst b/changelog/6189.bugfix.rst deleted file mode 100644 index 060a2260a..000000000 --- a/changelog/6189.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -Fix incorrect result of ``getmodpath`` method. diff --git a/changelog/6206.improvement.rst b/changelog/6206.improvement.rst deleted file mode 100644 index 67d8363b3..000000000 --- a/changelog/6206.improvement.rst +++ /dev/null @@ -1 +0,0 @@ -cacheprovider: improved robustness and performance with ``cache.set``. diff --git a/doc/en/announce/index.rst b/doc/en/announce/index.rst index e7c011411..6e6914f2d 100644 --- a/doc/en/announce/index.rst +++ b/doc/en/announce/index.rst @@ -6,6 +6,7 @@ Release announcements :maxdepth: 2 + release-5.3.0 release-5.2.4 release-5.2.3 release-5.2.2 diff --git a/doc/en/announce/release-5.3.0.rst b/doc/en/announce/release-5.3.0.rst new file mode 100644 index 000000000..9855a7a2d --- /dev/null +++ b/doc/en/announce/release-5.3.0.rst @@ -0,0 +1,45 @@ +pytest-5.3.0 +======================================= + +The pytest team is proud to announce the 5.3.0 release! + +pytest is a mature Python testing tool with more than a 2000 tests +against itself, passing on many different interpreters and platforms. + +This release contains a number of bugs fixes and improvements, so users are encouraged +to take a look at the CHANGELOG: + + https://docs.pytest.org/en/latest/changelog.html + +For complete documentation, please visit: + + https://docs.pytest.org/en/latest/ + +As usual, you can upgrade from pypi via: + + pip install -U pytest + +Thanks to all who contributed to this release, among them: + +* AnjoMan +* Anthony Sottile +* Anton Lodder +* Bruno Oliveira +* Daniel Hahler +* Gregory Lee +* Josh Karpel +* JoshKarpel +* Joshua Storck +* Kale Kundert +* MarcoGorelli +* Michael Krebs +* NNRepos +* Ran Benita +* TH3CHARLie +* Tibor Arpas +* Zac Hatfield-Dodds +* 林玮 + + +Happy testing, +The Pytest Development Team diff --git a/doc/en/example/markers.rst b/doc/en/example/markers.rst index ccddb1f66..8143b3fd4 100644 --- a/doc/en/example/markers.rst +++ b/doc/en/example/markers.rst @@ -622,7 +622,7 @@ then you will see two tests skipped and two executed tests as expected: test_plat.py s.s. [100%] ========================= short test summary info ========================== - SKIPPED [2] $REGENDOC_TMPDIR/conftest.py:13: cannot run on platform linux + SKIPPED [2] $REGENDOC_TMPDIR/conftest.py:12: cannot run on platform linux ======================= 2 passed, 2 skipped in 0.12s ======================= Note that if you specify a platform via the marker-command line option like this: diff --git a/doc/en/example/parametrize.rst b/doc/en/example/parametrize.rst index 0e131dace..c420761a4 100644 --- a/doc/en/example/parametrize.rst +++ b/doc/en/example/parametrize.rst @@ -475,10 +475,11 @@ Running it results in some skips if we don't have all the python interpreters in .. code-block:: pytest . $ pytest -rs -q multipython.py - ssssssssssss......sss...... [100%] + ssssssssssss...ssssssssssss [100%] ========================= short test summary info ========================== - SKIPPED [15] $REGENDOC_TMPDIR/CWD/multipython.py:30: 'python3.5' not found - 12 passed, 15 skipped in 0.12s + SKIPPED [12] $REGENDOC_TMPDIR/CWD/multipython.py:29: 'python3.5' not found + SKIPPED [12] $REGENDOC_TMPDIR/CWD/multipython.py:29: 'python3.7' not found + 3 passed, 24 skipped in 0.12s Indirect parametrization of optional implementations/imports -------------------------------------------------------------------- @@ -546,7 +547,7 @@ If you run this with reporting for skips enabled: test_module.py .s [100%] ========================= short test summary info ========================== - SKIPPED [1] $REGENDOC_TMPDIR/conftest.py:13: could not import 'opt2': No module named 'opt2' + SKIPPED [1] $REGENDOC_TMPDIR/conftest.py:12: could not import 'opt2': No module named 'opt2' ======================= 1 passed, 1 skipped in 0.12s ======================= You'll see that we don't have an ``opt2`` module and thus the second test run diff --git a/doc/en/example/simple.rst b/doc/en/example/simple.rst index 05ccbc9b2..1570850fc 100644 --- a/doc/en/example/simple.rst +++ b/doc/en/example/simple.rst @@ -443,7 +443,7 @@ Now we can profile which test functions execute the slowest: ========================= slowest 3 test durations ========================= 0.30s call test_some_are_slow.py::test_funcslow2 0.20s call test_some_are_slow.py::test_funcslow1 - 0.10s call test_some_are_slow.py::test_funcfast + 0.11s call test_some_are_slow.py::test_funcfast ============================ 3 passed in 0.12s ============================= incremental testing - test steps diff --git a/doc/en/usage.rst b/doc/en/usage.rst index ea849c1a7..245a67b68 100644 --- a/doc/en/usage.rst +++ b/doc/en/usage.rst @@ -241,7 +241,7 @@ Example: test_example.py:14: AssertionError ========================= short test summary info ========================== - SKIPPED [1] $REGENDOC_TMPDIR/test_example.py:23: skipping this test + SKIPPED [1] $REGENDOC_TMPDIR/test_example.py:22: skipping this test XFAIL test_example.py::test_xfail reason: xfailing this test XPASS test_example.py::test_xpass always xfail @@ -296,7 +296,7 @@ More than one character can be used, so for example to only see failed and skipp test_example.py:14: AssertionError ========================= short test summary info ========================== FAILED test_example.py::test_fail - assert 0 - SKIPPED [1] $REGENDOC_TMPDIR/test_example.py:23: skipping this test + SKIPPED [1] $REGENDOC_TMPDIR/test_example.py:22: skipping this test == 1 failed, 1 passed, 1 skipped, 1 xfailed, 1 xpassed, 1 error in 0.12s === Using ``p`` lists the passing tests, whilst ``P`` adds an extra section "PASSES" with those tests that passed but had diff --git a/doc/en/warnings.rst b/doc/en/warnings.rst index 54bb60da1..4b8be4469 100644 --- a/doc/en/warnings.rst +++ b/doc/en/warnings.rst @@ -41,7 +41,7 @@ Running pytest now produces this output: warnings.warn(UserWarning("api v1, should use functions from v2")) -- Docs: https://docs.pytest.org/en/latest/warnings.html - ====================== 1 passed, 1 warnings in 0.12s ======================= + ======================= 1 passed, 1 warning in 0.12s ======================= The ``-W`` flag can be passed to control which warnings will be displayed or even turn them into errors: @@ -407,7 +407,7 @@ defines an ``__init__`` constructor, as this prevents the class from being insta class Test: -- Docs: https://docs.pytest.org/en/latest/warnings.html - 1 warnings in 0.12s + 1 warning in 0.12s These warnings might be filtered using the same builtin mechanisms used to filter other types of warnings. diff --git a/doc/en/writing_plugins.rst b/doc/en/writing_plugins.rst index 8660746bd..2f7283791 100644 --- a/doc/en/writing_plugins.rst +++ b/doc/en/writing_plugins.rst @@ -442,7 +442,7 @@ additionally it is possible to copy examples for an example folder before runnin testdir.copy_example("test_example.py") -- Docs: https://docs.pytest.org/en/latest/warnings.html - ====================== 2 passed, 1 warnings in 0.12s ======================= + ======================= 2 passed, 1 warning in 0.12s ======================= For more information about the result object that ``runpytest()`` returns, and the methods that it provides please check out the :py:class:`RunResult