diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 6b06cbfb5..d98151b42 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -18,6 +18,72 @@ with advance notice in the **Deprecations** section of releases. .. towncrier release notes start +pytest 3.10.0 (2018-11-03) +========================== + +Features +-------- + +- `#2619 `_: Resume capturing output after ``continue`` with ``__import__("pdb").set_trace()``. + + This also adds a new ``pytest_leave_pdb`` hook, and passes in ``pdb`` to the + existing ``pytest_enter_pdb`` hook. + + +- `#4147 `_: Add ``-sw``, ``--stepwise`` as an alternative to ``--lf -x`` for stopping at the first failure, but starting the next test invocation from that test. See `the documentation `_ for more info. + + +- `#4188 `_: Make ``--color`` emit colorful dots when not running in verbose mode. Earlier, it would only colorize the test-by-test output if ``--verbose`` was also passed. + + +- `#4225 `_: Improve performance with collection reporting in non-quiet mode with terminals. + + The "collecting …" message is only printed/updated every 0.5s. + + + +Bug Fixes +--------- + +- `#2701 `_: Fix false ``RemovedInPytest4Warning: usage of Session... is deprecated, please use pytest`` warnings. + + +- `#4046 `_: Fix problems with running tests in package ``__init__.py`` files. + + +- `#4260 `_: Swallow warnings during anonymous compilation of source. + + +- `#4262 `_: Fix access denied error when deleting stale directories created by ``tmpdir`` / ``tmp_path``. + + +- `#611 `_: Naming a fixture ``request`` will now raise a warning: the ``request`` fixture is internal and + should not be overwritten as it will lead to internal errors. + + + +Improved Documentation +---------------------- + +- `#4255 `_: Added missing documentation about the fact that module names passed to filter warnings are not regex-escaped. + + + +Trivial/Internal Changes +------------------------ + +- `#4272 `_: Display cachedir also in non-verbose mode if non-default. + + +- `#4277 `_: pdb: improve message about output capturing with ``set_trace``. + + Do not display "IO-capturing turned off/on" when ``-s`` is used to avoid + confusion. + + +- `#4279 `_: Improve message and stack level of warnings issued by ``monkeypatch.setenv`` when the value of the environment variable is not a ``str``. + + pytest 3.9.3 (2018-10-27) ========================= diff --git a/changelog/2619.feature.rst b/changelog/2619.feature.rst deleted file mode 100644 index d2ce9c5ed..000000000 --- a/changelog/2619.feature.rst +++ /dev/null @@ -1,4 +0,0 @@ -Resume capturing output after ``continue`` with ``__import__("pdb").set_trace()``. - -This also adds a new ``pytest_leave_pdb`` hook, and passes in ``pdb`` to the -existing ``pytest_enter_pdb`` hook. diff --git a/changelog/2701.bugfix.rst b/changelog/2701.bugfix.rst deleted file mode 100644 index a942234fd..000000000 --- a/changelog/2701.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -Fix false ``RemovedInPytest4Warning: usage of Session... is deprecated, please use pytest`` warnings. diff --git a/changelog/4046.bugfix.rst b/changelog/4046.bugfix.rst deleted file mode 100644 index 2b0da70cd..000000000 --- a/changelog/4046.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -Fix problems with running tests in package ``__init__.py`` files. diff --git a/changelog/4147.feature.rst b/changelog/4147.feature.rst deleted file mode 100644 index 812898f90..000000000 --- a/changelog/4147.feature.rst +++ /dev/null @@ -1 +0,0 @@ -Add ``-sw``, ``--stepwise`` as an alternative to ``--lf -x`` for stopping at the first failure, but starting the next test invocation from that test. See `the documentation `_ for more info. diff --git a/changelog/4188.feature.rst b/changelog/4188.feature.rst deleted file mode 100644 index d3169efc0..000000000 --- a/changelog/4188.feature.rst +++ /dev/null @@ -1 +0,0 @@ -Make ``--color`` emit colorful dots when not running in verbose mode. Earlier, it would only colorize the test-by-test output if ``--verbose`` was also passed. diff --git a/changelog/4225.feature.rst b/changelog/4225.feature.rst deleted file mode 100644 index ffdf0e83f..000000000 --- a/changelog/4225.feature.rst +++ /dev/null @@ -1,3 +0,0 @@ -Improve performance with collection reporting in non-quiet mode with terminals. - -The "collecting …" message is only printed/updated every 0.5s. diff --git a/changelog/4255.doc.rst b/changelog/4255.doc.rst deleted file mode 100644 index 673027cf5..000000000 --- a/changelog/4255.doc.rst +++ /dev/null @@ -1 +0,0 @@ -Added missing documentation about the fact that module names passed to filter warnings are not regex-escaped. diff --git a/changelog/4260.bugfix.rst b/changelog/4260.bugfix.rst deleted file mode 100644 index e1e1a009f..000000000 --- a/changelog/4260.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -Swallow warnings during anonymous compilation of source. diff --git a/changelog/4262.bugfix.rst b/changelog/4262.bugfix.rst deleted file mode 100644 index 1487138b7..000000000 --- a/changelog/4262.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -Fix access denied error when deleting stale directories created by ``tmpdir`` / ``tmp_path``. diff --git a/changelog/4272.trivial.rst b/changelog/4272.trivial.rst deleted file mode 100644 index 4709f141d..000000000 --- a/changelog/4272.trivial.rst +++ /dev/null @@ -1 +0,0 @@ -Display cachedir also in non-verbose mode if non-default. diff --git a/changelog/4277.trivial.rst b/changelog/4277.trivial.rst deleted file mode 100644 index 691187882..000000000 --- a/changelog/4277.trivial.rst +++ /dev/null @@ -1,4 +0,0 @@ -pdb: improve message about output capturing with ``set_trace``. - -Do not display "IO-capturing turned off/on" when ``-s`` is used to avoid -confusion. diff --git a/changelog/4279.trivial.rst b/changelog/4279.trivial.rst deleted file mode 100644 index 9f4c4c473..000000000 --- a/changelog/4279.trivial.rst +++ /dev/null @@ -1 +0,0 @@ -Improve message and stack level of warnings issued by ``monkeypatch.setenv`` when the value of the environment variable is not a ``str``. diff --git a/changelog/611.bugfix.rst b/changelog/611.bugfix.rst deleted file mode 100644 index 1b39f4aa9..000000000 --- a/changelog/611.bugfix.rst +++ /dev/null @@ -1,2 +0,0 @@ -Naming a fixture ``request`` will now raise a warning: the ``request`` fixture is internal and -should not be overwritten as it will lead to internal errors. diff --git a/doc/en/announce/index.rst b/doc/en/announce/index.rst index 3d019ad80..8f583c5f5 100644 --- a/doc/en/announce/index.rst +++ b/doc/en/announce/index.rst @@ -6,6 +6,7 @@ Release announcements :maxdepth: 2 + release-3.10.0 release-3.9.3 release-3.9.2 release-3.9.1 diff --git a/doc/en/announce/release-3.10.0.rst b/doc/en/announce/release-3.10.0.rst new file mode 100644 index 000000000..b53df2702 --- /dev/null +++ b/doc/en/announce/release-3.10.0.rst @@ -0,0 +1,43 @@ +pytest-3.10.0 +======================================= + +The pytest team is proud to announce the 3.10.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: + +* Anders Hovmöller +* Andreu Vallbona Plazas +* Ankit Goel +* Anthony Sottile +* Bernardo Gomes +* Brianna Laugher +* Bruno Oliveira +* Daniel Hahler +* David Szotten +* Mick Koch +* Niclas Olofsson +* Palash Chatterjee +* Ronny Pfannschmidt +* Sven-Hendrik Haase +* Ville Skyttä +* William Jamir Silva + + +Happy testing, +The Pytest Development Team diff --git a/doc/en/cache.rst b/doc/en/cache.rst index 245edfc1b..4a917d45a 100644 --- a/doc/en/cache.rst +++ b/doc/en/cache.rst @@ -244,6 +244,8 @@ You can always peek at the content of the cache using the {'test_caching.py::test_function': True} cache/nodeids contains: ['test_caching.py::test_function'] + cache/stepwise contains: + [] example/value contains: 42 diff --git a/doc/en/example/nonpython.rst b/doc/en/example/nonpython.rst index bda15065a..8bcb75b43 100644 --- a/doc/en/example/nonpython.rst +++ b/doc/en/example/nonpython.rst @@ -85,8 +85,9 @@ interesting to just look at the collection tree:: rootdir: $REGENDOC_TMPDIR/nonpython, inifile: collected 2 items - - - + + + + ======================= no tests ran in 0.12 seconds ======================= diff --git a/doc/en/writing_plugins.rst b/doc/en/writing_plugins.rst index 464f8eb00..527a7263a 100644 --- a/doc/en/writing_plugins.rst +++ b/doc/en/writing_plugins.rst @@ -421,21 +421,9 @@ additionally it is possible to copy examples for an example folder before runnin test_example.py::test_plugin $REGENDOC_TMPDIR/test_example.py:4: PytestExperimentalApiWarning: testdir.copy_example is an experimental api that may change over time testdir.copy_example("test_example.py") - $PYTHON_PREFIX/lib/python3.6/site-packages/_pytest/compat.py:332: RemovedInPytest4Warning: usage of Session.Class is deprecated, please use pytest.Class instead - return getattr(object, name, default) - $PYTHON_PREFIX/lib/python3.6/site-packages/_pytest/compat.py:332: RemovedInPytest4Warning: usage of Session.File is deprecated, please use pytest.File instead - return getattr(object, name, default) - $PYTHON_PREFIX/lib/python3.6/site-packages/_pytest/compat.py:332: RemovedInPytest4Warning: usage of Session.Function is deprecated, please use pytest.Function instead - return getattr(object, name, default) - $PYTHON_PREFIX/lib/python3.6/site-packages/_pytest/compat.py:332: RemovedInPytest4Warning: usage of Session.Instance is deprecated, please use pytest.Instance instead - return getattr(object, name, default) - $PYTHON_PREFIX/lib/python3.6/site-packages/_pytest/compat.py:332: RemovedInPytest4Warning: usage of Session.Item is deprecated, please use pytest.Item instead - return getattr(object, name, default) - $PYTHON_PREFIX/lib/python3.6/site-packages/_pytest/compat.py:332: RemovedInPytest4Warning: usage of Session.Module is deprecated, please use pytest.Module instead - return getattr(object, name, default) -- Docs: https://docs.pytest.org/en/latest/warnings.html - =================== 2 passed, 7 warnings in 0.12 seconds =================== + =================== 2 passed, 1 warnings in 0.12 seconds =================== For more information about the result object that ``runpytest()`` returns, and the methods that it provides please check out the :py:class:`RunResult