diff --git a/CHANGELOG.rst b/CHANGELOG.rst index e837807cb..d27891b68 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -18,6 +18,40 @@ with advance notice in the **Deprecations** section of releases. .. towncrier release notes start +pytest 3.7.2 (2018-08-16) +========================= + +Bug Fixes +--------- + +- `#3671 `_: Fix ``filterwarnings`` mark not registered + + +- `#3768 `_, `#3789 `_: Fix test collection from packages mixed with normal directories. + + +- `#3771 `_: Fix infinite recursion during collection if a ``pytest_ignore_collect`` returns ``False`` instead of ``None``. + + +- `#3774 `_: Fix bug where decorated fixtures would lose functionality (for example ``@mock.patch``). + + +- `#3775 `_: Fix bug where importing modules or other objects with prefix ``pytest_`` prefix would raise a ``PluginValidationError``. + + +- `#3788 `_: Fix ``AttributeError`` during teardown of ``TestCase`` subclasses which raise an exception during ``__init__``. + + +- `#3804 `_: Fix traceback reporting for exceptions with ``__cause__`` cycles. + + + +Improved Documentation +---------------------- + +- `#3746 `_: Add documentation for ``metafunc.config`` that had been mistakenly hidden. + + pytest 3.7.1 (2018-08-02) ========================= diff --git a/changelog/3671.bugfix.rst b/changelog/3671.bugfix.rst deleted file mode 100644 index 9c61f8463..000000000 --- a/changelog/3671.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -Fix ``filterwarnings`` mark not registered diff --git a/changelog/3746.doc.rst b/changelog/3746.doc.rst deleted file mode 100644 index 4adecbec0..000000000 --- a/changelog/3746.doc.rst +++ /dev/null @@ -1 +0,0 @@ -Add documentation for ``metafunc.config`` that had been mistakenly hidden. diff --git a/changelog/3768.bugfix.rst b/changelog/3768.bugfix.rst deleted file mode 100644 index b824853c0..000000000 --- a/changelog/3768.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -Fix test collection from packages mixed with normal directories. diff --git a/changelog/3771.bugfix.rst b/changelog/3771.bugfix.rst deleted file mode 100644 index 09c953aa2..000000000 --- a/changelog/3771.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -Fix infinite recursion during collection if a ``pytest_ignore_collect`` returns ``False`` instead of ``None``. diff --git a/changelog/3774.bugfix.rst b/changelog/3774.bugfix.rst deleted file mode 100644 index 89be8edb6..000000000 --- a/changelog/3774.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -Fix bug where decorated fixtures would lose functionality (for example ``@mock.patch``). diff --git a/changelog/3775.bugfix.rst b/changelog/3775.bugfix.rst deleted file mode 100644 index dd5263f74..000000000 --- a/changelog/3775.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -Fix bug where importing modules or other objects with prefix ``pytest_`` prefix would raise a ``PluginValidationError``. diff --git a/changelog/3788.bugfix.rst b/changelog/3788.bugfix.rst deleted file mode 100644 index aa391e28b..000000000 --- a/changelog/3788.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -Fix ``AttributeError`` during teardown of ``TestCase`` subclasses which raise an exception during ``__init__``. diff --git a/changelog/3789.bugfix.rst b/changelog/3789.bugfix.rst deleted file mode 100644 index b824853c0..000000000 --- a/changelog/3789.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -Fix test collection from packages mixed with normal directories. diff --git a/changelog/3804.bugfix.rst b/changelog/3804.bugfix.rst deleted file mode 100644 index d03afe9b2..000000000 --- a/changelog/3804.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -Fix traceback reporting for exceptions with ``__cause__`` cycles. diff --git a/doc/en/announce/index.rst b/doc/en/announce/index.rst index d0f79a500..1e7f2ce0f 100644 --- a/doc/en/announce/index.rst +++ b/doc/en/announce/index.rst @@ -6,6 +6,7 @@ Release announcements :maxdepth: 2 + release-3.7.2 release-3.7.1 release-3.7.0 release-3.6.4 diff --git a/doc/en/announce/release-3.7.2.rst b/doc/en/announce/release-3.7.2.rst new file mode 100644 index 000000000..4f7e0744d --- /dev/null +++ b/doc/en/announce/release-3.7.2.rst @@ -0,0 +1,25 @@ +pytest-3.7.2 +======================================= + +pytest 3.7.2 has just been released to PyPI. + +This is a bug-fix release, being a drop-in replacement. To upgrade:: + + pip install --upgrade pytest + +The full changelog is available at http://doc.pytest.org/en/latest/changelog.html. + +Thanks to all who contributed to this release, among them: + +* Anthony Sottile +* Bruno Oliveira +* Daniel Hahler +* Josh Holland +* Ronny Pfannschmidt +* Sankt Petersbug +* Wes Thomas +* turturica + + +Happy testing, +The pytest Development Team diff --git a/doc/en/example/markers.rst b/doc/en/example/markers.rst index 93dc37197..1ae99436d 100644 --- a/doc/en/example/markers.rst +++ b/doc/en/example/markers.rst @@ -200,6 +200,8 @@ You can ask which markers exist for your test suite - the list includes our just $ pytest --markers @pytest.mark.webtest: mark a test as a webtest. + @pytest.mark.filterwarnings(warning): add a warning filter to the given test. see http://pytest.org/latest/warnings.html#pytest-mark-filterwarnings + @pytest.mark.skip(reason=None): skip the given test function with an optional reason. Example: skip(reason="no way of currently testing this") skips the test. @pytest.mark.skipif(condition): skip the given test function if eval(condition) results in a True value. Evaluation happens within the module global context. Example: skipif('sys.platform == "win32"') skips the test if we are on the win32 platform. see http://pytest.org/latest/skipping.html @@ -374,6 +376,8 @@ The ``--markers`` option always gives you a list of available markers:: $ pytest --markers @pytest.mark.env(name): mark test to run only on named environment + @pytest.mark.filterwarnings(warning): add a warning filter to the given test. see http://pytest.org/latest/warnings.html#pytest-mark-filterwarnings + @pytest.mark.skip(reason=None): skip the given test function with an optional reason. Example: skip(reason="no way of currently testing this") skips the test. @pytest.mark.skipif(condition): skip the given test function if eval(condition) results in a True value. Evaluation happens within the module global context. Example: skipif('sys.platform == "win32"') skips the test if we are on the win32 platform. see http://pytest.org/latest/skipping.html diff --git a/doc/en/example/nonpython.rst b/doc/en/example/nonpython.rst index 2bc70c4cc..bda15065a 100644 --- a/doc/en/example/nonpython.rst +++ b/doc/en/example/nonpython.rst @@ -84,8 +84,9 @@ interesting to just look at the collection tree:: platform linux -- Python 3.x.y, pytest-3.x.y, py-1.x.y, pluggy-0.x.y rootdir: $REGENDOC_TMPDIR/nonpython, inifile: collected 2 items - - - + + + + ======================= no tests ran in 0.12 seconds ======================= diff --git a/doc/en/example/parametrize.rst b/doc/en/example/parametrize.rst index 43f4f598f..fdc802554 100644 --- a/doc/en/example/parametrize.rst +++ b/doc/en/example/parametrize.rst @@ -411,11 +411,10 @@ is to be run with different sets of arguments for its three arguments: Running it results in some skips if we don't have all the python interpreters installed and otherwise runs all combinations (5 interpreters times 5 interpreters times 3 objects to serialize/deserialize):: . $ pytest -rs -q multipython.py - ...ssssssssssssssssssssssss [100%] + ...sss...sssssssss...sss... [100%] ========================= short test summary info ========================== - SKIP [12] $REGENDOC_TMPDIR/CWD/multipython.py:28: 'python3.4' not found - SKIP [12] $REGENDOC_TMPDIR/CWD/multipython.py:28: 'python3.5' not found - 3 passed, 24 skipped in 0.12 seconds + SKIP [15] $REGENDOC_TMPDIR/CWD/multipython.py:28: 'python3.4' not found + 12 passed, 15 skipped in 0.12 seconds Indirect parametrization of optional implementations/imports --------------------------------------------------------------------