diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 5d2fa4b38..55fba65eb 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -18,6 +18,45 @@ with advance notice in the **Deprecations** section of releases. .. towncrier release notes start +pytest 5.2.0 (2019-09-28) +========================= + +Deprecations +------------ + +- `#1682 `_: Passing arguments to pytest.fixture() as positional arguments is deprecated - pass them + as a keyword argument instead. + + + +Features +-------- + +- `#1682 `_: The ``scope`` parameter of ``@pytest.fixture`` can now be a callable that receives + the fixture name and the ``config`` object as keyword-only parameters. + See `the docs `__ for more information. + + +- `#5764 `_: New behavior of the ``--pastebin`` option: failures to connect to the pastebin server are reported, without failing the pytest run + + + +Bug Fixes +--------- + +- `#5806 `_: Fix "lexer" being used when uploading to bpaste.net from ``--pastebin`` to "text". + + +- `#5884 `_: Fix ``--setup-only`` and ``--setup-show`` for custom pytest items. + + + +Trivial/Internal Changes +------------------------ + +- `#5056 `_: The HelpFormatter uses ``py.io.get_terminal_width`` for better width detection. + + pytest 5.1.3 (2019-09-18) ========================= diff --git a/changelog/1682.deprecation.rst b/changelog/1682.deprecation.rst deleted file mode 100644 index 741164eb6..000000000 --- a/changelog/1682.deprecation.rst +++ /dev/null @@ -1,2 +0,0 @@ -Passing arguments to pytest.fixture() as positional arguments is deprecated - pass them -as a keyword argument instead. diff --git a/changelog/1682.feature.rst b/changelog/1682.feature.rst deleted file mode 100644 index 392de6363..000000000 --- a/changelog/1682.feature.rst +++ /dev/null @@ -1,3 +0,0 @@ -The ``scope`` parameter of ``@pytest.fixture`` can now be a callable that receives -the fixture name and the ``config`` object as keyword-only parameters. -See `the docs `__ for more information. diff --git a/changelog/5056.trivial.rst b/changelog/5056.trivial.rst deleted file mode 100644 index 75e01a88b..000000000 --- a/changelog/5056.trivial.rst +++ /dev/null @@ -1 +0,0 @@ -The HelpFormatter uses ``py.io.get_terminal_width`` for better width detection. diff --git a/changelog/5764.feature.rst b/changelog/5764.feature.rst deleted file mode 100644 index 3ac77b8fe..000000000 --- a/changelog/5764.feature.rst +++ /dev/null @@ -1 +0,0 @@ -New behavior of the ``--pastebin`` option: failures to connect to the pastebin server are reported, without failing the pytest run diff --git a/changelog/5806.bugfix.rst b/changelog/5806.bugfix.rst deleted file mode 100644 index ec887768d..000000000 --- a/changelog/5806.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -Fix "lexer" being used when uploading to bpaste.net from ``--pastebin`` to "text". diff --git a/changelog/5884.bugfix.rst b/changelog/5884.bugfix.rst deleted file mode 100644 index 42d207ce7..000000000 --- a/changelog/5884.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -Fix ``--setup-only`` and ``--setup-show`` for custom pytest items. diff --git a/doc/en/announce/index.rst b/doc/en/announce/index.rst index a601b247e..5fe3cc78c 100644 --- a/doc/en/announce/index.rst +++ b/doc/en/announce/index.rst @@ -6,6 +6,7 @@ Release announcements :maxdepth: 2 + release-5.2.0 release-5.1.3 release-5.1.2 release-5.1.1 diff --git a/doc/en/announce/release-5.2.0.rst b/doc/en/announce/release-5.2.0.rst new file mode 100644 index 000000000..f61d70222 --- /dev/null +++ b/doc/en/announce/release-5.2.0.rst @@ -0,0 +1,36 @@ +pytest-5.2.0 +======================================= + +The pytest team is proud to announce the 5.2.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: + +* Andrzej Klajnert +* Anthony Sottile +* Bruno Oliveira +* Daniel Hahler +* James Cooke +* Michael Goerz +* Ran Benita +* Tomáš Chvátal +* aklajnert + + +Happy testing, +The Pytest Development Team diff --git a/doc/en/example/parametrize.rst b/doc/en/example/parametrize.rst index 640106ccd..0b94e425c 100644 --- a/doc/en/example/parametrize.rst +++ b/doc/en/example/parametrize.rst @@ -475,10 +475,10 @@ 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...ssssssssssss [100%] + ssssssssssssssssssssssss... [100%] ========================= short test summary info ========================== SKIPPED [12] $REGENDOC_TMPDIR/CWD/multipython.py:30: 'python3.5' not found - SKIPPED [12] $REGENDOC_TMPDIR/CWD/multipython.py:30: 'python3.7' not found + SKIPPED [12] $REGENDOC_TMPDIR/CWD/multipython.py:30: 'python3.6' not found 3 passed, 24 skipped in 0.12s Indirect parametrization of optional implementations/imports diff --git a/doc/en/example/reportingdemo.rst b/doc/en/example/reportingdemo.rst index 1c06782f6..eb978c5ea 100644 --- a/doc/en/example/reportingdemo.rst +++ b/doc/en/example/reportingdemo.rst @@ -436,7 +436,7 @@ Here is a nice run of several failures and how ``pytest`` presents things: items = [1, 2, 3] print("items is {!r}".format(items)) > a, b = items.pop() - E TypeError: 'int' object is not iterable + E TypeError: cannot unpack non-iterable int object failure_demo.py:181: TypeError --------------------------- Captured stdout call --------------------------- @@ -516,7 +516,7 @@ Here is a nice run of several failures and how ``pytest`` presents things: def test_z2_type_error(self): items = 3 > a, b = items - E TypeError: 'int' object is not iterable + E TypeError: cannot unpack non-iterable int object failure_demo.py:222: TypeError ______________________ TestMoreErrors.test_startswith ______________________ diff --git a/doc/en/example/simple.rst b/doc/en/example/simple.rst index 71ac77f7b..a7cd06d31 100644 --- a/doc/en/example/simple.rst +++ b/doc/en/example/simple.rst @@ -445,7 +445,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.21s call test_some_are_slow.py::test_funcslow1 + 0.20s call test_some_are_slow.py::test_funcslow1 0.10s call test_some_are_slow.py::test_funcfast ============================ 3 passed in 0.12s ============================= diff --git a/doc/en/getting-started.rst b/doc/en/getting-started.rst index 2bdd68ea3..97347f126 100644 --- a/doc/en/getting-started.rst +++ b/doc/en/getting-started.rst @@ -28,7 +28,7 @@ Install ``pytest`` .. code-block:: bash $ pytest --version - This is pytest version 5.x.y, imported from $PYTHON_PREFIX/lib/python3.6/site-packages/pytest.py + This is pytest version 5.x.y, imported from $PYTHON_PREFIX/lib/python3.7/site-packages/pytest.py .. _`simpletest`: