From 905ec08fb3f33459dcf8dc083b181ad92d4c7ff6 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Mon, 28 Jan 2019 20:17:04 +0000 Subject: [PATCH 1/3] Preparing release version 4.1.2 --- CHANGELOG.rst | 39 +++++++++++++++++++++++++++++++ changelog/4402.bugfix.rst | 4 ---- changelog/4536.bugfix.rst | 1 - changelog/4643.trivial.rst | 3 --- changelog/4649.bugfix.rst | 1 - changelog/4653.bugfix.rst | 1 - changelog/4657.trivial.rst | 1 - changelog/4667.bugfix.rst | 1 - changelog/4669.bugfix.rst | 1 - doc/en/announce/index.rst | 1 + doc/en/announce/release-4.1.2.rst | 25 ++++++++++++++++++++ doc/en/example/markers.rst | 2 +- doc/en/example/parametrize.rst | 6 ++--- doc/en/example/simple.rst | 2 +- doc/en/parametrize.rst | 2 +- doc/en/usage.rst | 8 +++---- 16 files changed, 75 insertions(+), 23 deletions(-) delete mode 100644 changelog/4402.bugfix.rst delete mode 100644 changelog/4536.bugfix.rst delete mode 100644 changelog/4643.trivial.rst delete mode 100644 changelog/4649.bugfix.rst delete mode 100644 changelog/4653.bugfix.rst delete mode 100644 changelog/4657.trivial.rst delete mode 100644 changelog/4667.bugfix.rst delete mode 100644 changelog/4669.bugfix.rst create mode 100644 doc/en/announce/release-4.1.2.rst diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 02ea6e84f62..54facdfcfe8 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 4.1.2 (2019-01-28) +========================= + +Bug Fixes +--------- + +- `#4402 `_: Warning summary now groups warnings by message instead of by test id. + + This makes the output more compact and better conveys the general idea of how much code is + actually generating warnings, instead of how many tests call that code. + + +- `#4536 `_: ``monkeypatch.delattr`` handles class descriptors like ``staticmethod``/``classmethod``. + + +- `#4649 `_: Restore marks being considered keywords for keyword expressions. + + +- `#4653 `_: ``tmp_path`` fixture and other related ones provides resolved path (a.k.a real path) + + +- `#4667 `_: ``pytest_terminal_summary`` uses result from ``pytest_report_teststatus`` hook, rather than hardcoded strings. + + +- `#4669 `_: Correctly handle ``unittest.SkipTest`` exception containing non-ascii characters on Python 2. + + + +Trivial/Internal Changes +------------------------ + +- `#4643 `_: Use ``a.item()`` instead of the deprecated ``np.asscalar(a)`` in ``pytest.approx``. + + ``np.asscalar`` has been `deprecated `__ in ``numpy 1.16.``. + + +- `#4657 `_: Copy saferepr from pylib + + pytest 4.1.1 (2019-01-12) ========================= diff --git a/changelog/4402.bugfix.rst b/changelog/4402.bugfix.rst deleted file mode 100644 index 9b338aaa5ea..00000000000 --- a/changelog/4402.bugfix.rst +++ /dev/null @@ -1,4 +0,0 @@ -Warning summary now groups warnings by message instead of by test id. - -This makes the output more compact and better conveys the general idea of how much code is -actually generating warnings, instead of how many tests call that code. diff --git a/changelog/4536.bugfix.rst b/changelog/4536.bugfix.rst deleted file mode 100644 index 0ec84a62ba2..00000000000 --- a/changelog/4536.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -``monkeypatch.delattr`` handles class descriptors like ``staticmethod``/``classmethod``. diff --git a/changelog/4643.trivial.rst b/changelog/4643.trivial.rst deleted file mode 100644 index 75385f4b370..00000000000 --- a/changelog/4643.trivial.rst +++ /dev/null @@ -1,3 +0,0 @@ -Use ``a.item()`` instead of the deprecated ``np.asscalar(a)`` in ``pytest.approx``. - -``np.asscalar`` has been `deprecated `__ in ``numpy 1.16.``. diff --git a/changelog/4649.bugfix.rst b/changelog/4649.bugfix.rst deleted file mode 100644 index 74b241781d8..00000000000 --- a/changelog/4649.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -Restore marks being considered keywords for keyword expressions. diff --git a/changelog/4653.bugfix.rst b/changelog/4653.bugfix.rst deleted file mode 100644 index 5b5b3674552..00000000000 --- a/changelog/4653.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -``tmp_path`` fixture and other related ones provides resolved path (a.k.a real path) diff --git a/changelog/4657.trivial.rst b/changelog/4657.trivial.rst deleted file mode 100644 index abdab08eb6a..00000000000 --- a/changelog/4657.trivial.rst +++ /dev/null @@ -1 +0,0 @@ -Copy saferepr from pylib diff --git a/changelog/4667.bugfix.rst b/changelog/4667.bugfix.rst deleted file mode 100644 index ac2d8567c6c..00000000000 --- a/changelog/4667.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -``pytest_terminal_summary`` uses result from ``pytest_report_teststatus`` hook, rather than hardcoded strings. diff --git a/changelog/4669.bugfix.rst b/changelog/4669.bugfix.rst deleted file mode 100644 index e5c18353c95..00000000000 --- a/changelog/4669.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -Correctly handle ``unittest.SkipTest`` exception containing non-ascii characters on Python 2. diff --git a/doc/en/announce/index.rst b/doc/en/announce/index.rst index 51a3227ea9d..1e612d9cb49 100644 --- a/doc/en/announce/index.rst +++ b/doc/en/announce/index.rst @@ -6,6 +6,7 @@ Release announcements :maxdepth: 2 + release-4.1.2 release-4.1.1 release-4.1.0 release-4.0.2 diff --git a/doc/en/announce/release-4.1.2.rst b/doc/en/announce/release-4.1.2.rst new file mode 100644 index 00000000000..585305c4028 --- /dev/null +++ b/doc/en/announce/release-4.1.2.rst @@ -0,0 +1,25 @@ +pytest-4.1.2 +======================================= + +pytest 4.1.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 https://docs.pytest.org/en/latest/changelog.html. + +Thanks to all who contributed to this release, among them: + +* Adam Uhlir +* Anthony Sottile +* Bruno Oliveira +* Christopher Dignam +* Daniel Hahler +* Ronny Pfannschmidt +* Thomas Hisch +* wim glenn + + +Happy testing, +The pytest Development Team diff --git a/doc/en/example/markers.rst b/doc/en/example/markers.rst index 9d325c30e58..7f77ec6ce11 100644 --- a/doc/en/example/markers.rst +++ b/doc/en/example/markers.rst @@ -551,7 +551,7 @@ then you will see two tests skipped and two executed tests as expected: test_plat.py s.s. [100%] ========================= short test summary info ========================== - SKIP [2] $REGENDOC_TMPDIR/conftest.py:12: cannot run on platform linux + SKIPPED [2] $REGENDOC_TMPDIR/conftest.py:12: cannot run on platform linux =================== 2 passed, 2 skipped in 0.12 seconds ==================== diff --git a/doc/en/example/parametrize.rst b/doc/en/example/parametrize.rst index 98aaeae3b4e..b16ff9b1494 100644 --- a/doc/en/example/parametrize.rst +++ b/doc/en/example/parametrize.rst @@ -433,7 +433,7 @@ Running it results in some skips if we don't have all the python interpreters in . $ pytest -rs -q multipython.py ...sss...sssssssss...sss... [100%] ========================= short test summary info ========================== - SKIP [15] $REGENDOC_TMPDIR/CWD/multipython.py:30: 'python3.4' not found + SKIPPED [15] $REGENDOC_TMPDIR/CWD/multipython.py:30: 'python3.4' not found 12 passed, 15 skipped in 0.12 seconds Indirect parametrization of optional implementations/imports @@ -489,7 +489,7 @@ If you run this with reporting for skips enabled: test_module.py .s [100%] ========================= short test summary info ========================== - SKIP [1] $REGENDOC_TMPDIR/conftest.py:11: could not import 'opt2' + SKIPPED [1] $REGENDOC_TMPDIR/conftest.py:11: could not import 'opt2' =================== 1 passed, 1 skipped in 0.12 seconds ==================== @@ -547,7 +547,7 @@ Then run ``pytest`` with verbose mode and with only the ``basic`` marker: test_pytest_param_example.py::test_eval[1+7-8] PASSED [ 33%] test_pytest_param_example.py::test_eval[basic_2+4] PASSED [ 66%] - test_pytest_param_example.py::test_eval[basic_6*9] xfail [100%] + test_pytest_param_example.py::test_eval[basic_6*9] XFAIL [100%] ============ 2 passed, 14 deselected, 1 xfailed in 0.12 seconds ============ diff --git a/doc/en/example/simple.rst b/doc/en/example/simple.rst index 76a1ddc807e..bf78ca9a373 100644 --- a/doc/en/example/simple.rst +++ b/doc/en/example/simple.rst @@ -193,7 +193,7 @@ and when running it will see a skipped "slow" test: test_module.py .s [100%] ========================= short test summary info ========================== - SKIP [1] test_module.py:8: need --runslow option to run + SKIPPED [1] test_module.py:8: need --runslow option to run =================== 1 passed, 1 skipped in 0.12 seconds ==================== diff --git a/doc/en/parametrize.rst b/doc/en/parametrize.rst index 099b531c2db..6958850005a 100644 --- a/doc/en/parametrize.rst +++ b/doc/en/parametrize.rst @@ -207,7 +207,7 @@ list: $ pytest -q -rs test_strings.py s [100%] ========================= short test summary info ========================== - SKIP [1] test_strings.py: got empty parameter set ['stringinput'], function test_valid_string at $REGENDOC_TMPDIR/test_strings.py:1 + SKIPPED [1] test_strings.py: got empty parameter set ['stringinput'], function test_valid_string at $REGENDOC_TMPDIR/test_strings.py:1 1 skipped in 0.12 seconds Note that when calling ``metafunc.parametrize`` multiple times with different parameter sets, all parameter names across diff --git a/doc/en/usage.rst b/doc/en/usage.rst index 3ff6a0dd5d9..7ecd6ff30ca 100644 --- a/doc/en/usage.rst +++ b/doc/en/usage.rst @@ -216,12 +216,12 @@ Example: test_example.py:14: AssertionError ========================= short test summary info ========================== - SKIP [1] $REGENDOC_TMPDIR/test_example.py:23: skipping this test + SKIPPED [1] $REGENDOC_TMPDIR/test_example.py:23: skipping this test XFAIL test_example.py::test_xfail reason: xfailing this test XPASS test_example.py::test_xpass always xfail ERROR test_example.py::test_error - FAIL test_example.py::test_fail + FAILED test_example.py::test_fail 1 failed, 1 passed, 1 skipped, 1 xfailed, 1 xpassed, 1 error in 0.12 seconds The ``-r`` options accepts a number of characters after it, with ``a`` used above meaning "all except passes". @@ -267,8 +267,8 @@ 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 ========================== - FAIL test_example.py::test_fail - SKIP [1] $REGENDOC_TMPDIR/test_example.py:23: skipping this test + FAILED test_example.py::test_fail + SKIPPED [1] $REGENDOC_TMPDIR/test_example.py:23: skipping this test 1 failed, 1 passed, 1 skipped, 1 xfailed, 1 xpassed, 1 error in 0.12 seconds Using ``p`` lists the passing tests, whilst ``P`` adds an extra section "PASSES" with those tests that passed but had From ac4096df57b2d6af41b38e82b1f0f89b94ad9cf9 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Mon, 28 Jan 2019 21:29:18 -0200 Subject: [PATCH 2/3] Use pygments-pytest >=1.1.1 --- doc/en/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/en/requirements.txt b/doc/en/requirements.txt index 4e2b8ce1a41..b69fc940d2f 100644 --- a/doc/en/requirements.txt +++ b/doc/en/requirements.txt @@ -1,4 +1,4 @@ -pygments-pytest>=1.1.0 +pygments-pytest>=1.1.1 sphinx>=1.8.2 sphinxcontrib-trio sphinx-removed-in>=0.1.3 From bb3f35f27f80256ecb684a50d261c1a8c030152c Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Mon, 28 Jan 2019 21:31:41 -0200 Subject: [PATCH 3/3] Ignore pip-wheel-metadata directory It seems this folder is generated by latest pip version --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index e2d59502cb4..f4e32bec266 100644 --- a/.gitignore +++ b/.gitignore @@ -45,3 +45,4 @@ coverage.xml .project .settings .vscode +pip-wheel-metadata/