Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,4 @@ coverage.xml
.project
.settings
.vscode
pip-wheel-metadata/
39 changes: 39 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://github.com/pytest-dev/pytest/issues/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 <https://github.com/pytest-dev/pytest/issues/4536>`_: ``monkeypatch.delattr`` handles class descriptors like ``staticmethod``/``classmethod``.


- `#4649 <https://github.com/pytest-dev/pytest/issues/4649>`_: Restore marks being considered keywords for keyword expressions.


- `#4653 <https://github.com/pytest-dev/pytest/issues/4653>`_: ``tmp_path`` fixture and other related ones provides resolved path (a.k.a real path)


- `#4667 <https://github.com/pytest-dev/pytest/issues/4667>`_: ``pytest_terminal_summary`` uses result from ``pytest_report_teststatus`` hook, rather than hardcoded strings.


- `#4669 <https://github.com/pytest-dev/pytest/issues/4669>`_: Correctly handle ``unittest.SkipTest`` exception containing non-ascii characters on Python 2.



Trivial/Internal Changes
------------------------

- `#4643 <https://github.com/pytest-dev/pytest/issues/4643>`_: Use ``a.item()`` instead of the deprecated ``np.asscalar(a)`` in ``pytest.approx``.

``np.asscalar`` has been `deprecated <https://github.com/numpy/numpy/blob/master/doc/release/1.16.0-notes.rst#new-deprecations>`__ in ``numpy 1.16.``.


- `#4657 <https://github.com/pytest-dev/pytest/issues/4657>`_: Copy saferepr from pylib


pytest 4.1.1 (2019-01-12)
=========================

Expand Down
4 changes: 0 additions & 4 deletions changelog/4402.bugfix.rst

This file was deleted.

1 change: 0 additions & 1 deletion changelog/4536.bugfix.rst

This file was deleted.

3 changes: 0 additions & 3 deletions changelog/4643.trivial.rst

This file was deleted.

1 change: 0 additions & 1 deletion changelog/4649.bugfix.rst

This file was deleted.

1 change: 0 additions & 1 deletion changelog/4653.bugfix.rst

This file was deleted.

1 change: 0 additions & 1 deletion changelog/4657.trivial.rst

This file was deleted.

1 change: 0 additions & 1 deletion changelog/4667.bugfix.rst

This file was deleted.

1 change: 0 additions & 1 deletion changelog/4669.bugfix.rst

This file was deleted.

1 change: 1 addition & 0 deletions doc/en/announce/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Release announcements
:maxdepth: 2


release-4.1.2
release-4.1.1
release-4.1.0
release-4.0.2
Expand Down
25 changes: 25 additions & 0 deletions doc/en/announce/release-4.1.2.rst
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion doc/en/example/markers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 ====================

Expand Down
6 changes: 3 additions & 3 deletions doc/en/example/parametrize.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 ====================

Expand Down Expand Up @@ -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 ============

Expand Down
2 changes: 1 addition & 1 deletion doc/en/example/simple.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 ====================

Expand Down
2 changes: 1 addition & 1 deletion doc/en/parametrize.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion doc/en/requirements.txt
Original file line number Diff line number Diff line change
@@ -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
8 changes: 4 additions & 4 deletions doc/en/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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".
Expand Down Expand Up @@ -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
Expand Down