Skip to content

Commit

Permalink
Preparing release version 5.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoddemus committed Aug 30, 2019
1 parent f9cc704 commit e56544c
Show file tree
Hide file tree
Showing 27 changed files with 127 additions and 86 deletions.
26 changes: 26 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,32 @@ with advance notice in the **Deprecations** section of releases.
.. towncrier release notes start
pytest 5.1.2 (2019-08-30)
=========================

Bug Fixes
---------

- `#2270 <https://github.com/pytest-dev/pytest/issues/2270>`_: Fixed ``self`` reference in function-scoped fixtures defined plugin classes: previously ``self``
would be a reference to a *test* class, not the *plugin* class.


- `#570 <https://github.com/pytest-dev/pytest/issues/570>`_: Fixed long standing issue where fixture scope was not respected when indirect fixtures were used during
parametrization.


- `#5782 <https://github.com/pytest-dev/pytest/issues/5782>`_: Fix decoding error when printing an error response from ``--pastebin``.


- `#5786 <https://github.com/pytest-dev/pytest/issues/5786>`_: Chained exceptions in test and collection reports are now correctly serialized, allowing plugins like
``pytest-xdist`` to display them properly.


- `#5792 <https://github.com/pytest-dev/pytest/issues/5792>`_: Windows: Fix error that occurs in certain circumstances when loading
``conftest.py`` from a working directory that has casing other than the one stored
in the filesystem (e.g., ``c:\test`` instead of ``C:\test``).


pytest 5.1.1 (2019-08-20)
=========================

Expand Down
2 changes: 0 additions & 2 deletions changelog/2270.bugfix.rst

This file was deleted.

2 changes: 0 additions & 2 deletions changelog/570.bugfix.rst

This file was deleted.

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

This file was deleted.

2 changes: 0 additions & 2 deletions changelog/5786.bugfix.rst

This file was deleted.

3 changes: 0 additions & 3 deletions changelog/5792.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-5.1.2
release-5.1.1
release-5.1.0
release-5.0.1
Expand Down
23 changes: 23 additions & 0 deletions doc/en/announce/release-5.1.2.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
pytest-5.1.2
=======================================

pytest 5.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:

* Andrzej Klajnert
* Anthony Sottile
* Bruno Oliveira
* Christian Neumüller
* Robert Holt
* linchiwei123


Happy testing,
The pytest Development Team
4 changes: 2 additions & 2 deletions doc/en/assert.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ you will see the return value of the function call:
E + where 3 = f()
test_assert1.py:6: AssertionError
============================ 1 failed in 0.02s =============================
============================ 1 failed in 0.12s =============================
``pytest`` has support for showing the values of the most common subexpressions
including calls, attributes, comparisons, and binary and unary
Expand Down Expand Up @@ -208,7 +208,7 @@ if you run this module:
E Use -v to get the full diff
test_assert2.py:6: AssertionError
============================ 1 failed in 0.02s =============================
============================ 1 failed in 0.12s =============================
Special comparisons are done for a number of cases:

Expand Down
10 changes: 5 additions & 5 deletions doc/en/cache.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ If you run this for the first time you will see two failures:
E Failed: bad luck
test_50.py:7: Failed
2 failed, 48 passed in 0.08s
2 failed, 48 passed in 0.07s
If you then run it with ``--lf``:

Expand Down Expand Up @@ -114,7 +114,7 @@ If you then run it with ``--lf``:
E Failed: bad luck
test_50.py:7: Failed
===================== 2 failed, 48 deselected in 0.02s =====================
===================== 2 failed, 48 deselected in 0.12s =====================
You have run only the two failing tests from the last run, while the 48 passing
tests have not been run ("deselected").
Expand Down Expand Up @@ -158,7 +158,7 @@ of ``FF`` and dots):
E Failed: bad luck
test_50.py:7: Failed
======================= 2 failed, 48 passed in 0.07s =======================
======================= 2 failed, 48 passed in 0.12s =======================
.. _`config.cache`:

Expand Down Expand Up @@ -283,7 +283,7 @@ You can always peek at the content of the cache using the
example/value contains:
42
========================== no tests ran in 0.00s ===========================
========================== no tests ran in 0.12s ===========================
``--cache-show`` takes an optional argument to specify a glob pattern for
filtering:
Expand All @@ -300,7 +300,7 @@ filtering:
example/value contains:
42
========================== no tests ran in 0.00s ===========================
========================== no tests ran in 0.12s ===========================
Clearing Cache content
----------------------
Expand Down
2 changes: 1 addition & 1 deletion doc/en/capture.rst
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ of the failing function and hide the other one:
test_module.py:12: AssertionError
-------------------------- Captured stdout setup ---------------------------
setting up <function test_func2 at 0xdeadbeef>
======================= 1 failed, 1 passed in 0.02s ========================
======================= 1 failed, 1 passed in 0.12s ========================
Accessing captured output from a test function
---------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions doc/en/doctest.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ then you can just invoke ``pytest`` directly:
test_example.txt . [100%]
============================ 1 passed in 0.01s =============================
============================ 1 passed in 0.12s =============================
By default, pytest will collect ``test*.txt`` files looking for doctest directives, but you
can pass additional globs using the ``--doctest-glob`` option (multi-allowed).
Expand Down Expand Up @@ -66,7 +66,7 @@ and functions, including from test modules:
mymodule.py . [ 50%]
test_example.txt . [100%]
============================ 2 passed in 0.01s =============================
============================ 2 passed in 0.12s =============================
You can make these changes permanent in your project by
putting them into a pytest.ini file like this:
Expand Down
32 changes: 16 additions & 16 deletions doc/en/example/markers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ You can then restrict a test run to only run tests marked with ``webtest``:
test_server.py::test_send_http PASSED [100%]
===================== 1 passed, 3 deselected in 0.01s ======================
===================== 1 passed, 3 deselected in 0.12s ======================
Or the inverse, running all tests except the webtest ones:

Expand All @@ -69,7 +69,7 @@ Or the inverse, running all tests except the webtest ones:
test_server.py::test_another PASSED [ 66%]
test_server.py::TestClass::test_method PASSED [100%]
===================== 3 passed, 1 deselected in 0.01s ======================
===================== 3 passed, 1 deselected in 0.12s ======================
Selecting tests based on their node ID
--------------------------------------
Expand All @@ -89,7 +89,7 @@ tests based on their module, class, method, or function name:
test_server.py::TestClass::test_method PASSED [100%]
============================ 1 passed in 0.01s =============================
============================ 1 passed in 0.12s =============================
You can also select on the class:

Expand All @@ -104,7 +104,7 @@ You can also select on the class:
test_server.py::TestClass::test_method PASSED [100%]
============================ 1 passed in 0.01s =============================
============================ 1 passed in 0.12s =============================
Or select multiple nodes:

Expand All @@ -120,7 +120,7 @@ Or select multiple nodes:
test_server.py::TestClass::test_method PASSED [ 50%]
test_server.py::test_send_http PASSED [100%]
============================ 2 passed in 0.01s =============================
============================ 2 passed in 0.12s =============================
.. _node-id:

Expand Down Expand Up @@ -159,7 +159,7 @@ select tests based on their names:
test_server.py::test_send_http PASSED [100%]
===================== 1 passed, 3 deselected in 0.01s ======================
===================== 1 passed, 3 deselected in 0.12s ======================
And you can also run all tests except the ones that match the keyword:

Expand All @@ -176,7 +176,7 @@ And you can also run all tests except the ones that match the keyword:
test_server.py::test_another PASSED [ 66%]
test_server.py::TestClass::test_method PASSED [100%]
===================== 3 passed, 1 deselected in 0.01s ======================
===================== 3 passed, 1 deselected in 0.12s ======================
Or to select "http" and "quick" tests:

Expand All @@ -192,7 +192,7 @@ Or to select "http" and "quick" tests:
test_server.py::test_send_http PASSED [ 50%]
test_server.py::test_something_quick PASSED [100%]
===================== 2 passed, 2 deselected in 0.01s ======================
===================== 2 passed, 2 deselected in 0.12s ======================
.. note::

Expand Down Expand Up @@ -413,7 +413,7 @@ the test needs:
test_someenv.py s [100%]
============================ 1 skipped in 0.00s ============================
============================ 1 skipped in 0.12s ============================
and here is one that specifies exactly the environment needed:

Expand All @@ -428,7 +428,7 @@ and here is one that specifies exactly the environment needed:
test_someenv.py . [100%]
============================ 1 passed in 0.01s =============================
============================ 1 passed in 0.12s =============================
The ``--markers`` option always gives you a list of available markers:

Expand Down Expand Up @@ -499,7 +499,7 @@ The output is as follows:
$ pytest -q -s
Mark(name='my_marker', args=(<function hello_world at 0xdeadbeef>,), kwargs={})
.
1 passed in 0.00s
1 passed in 0.01s
We can see that the custom marker has its argument set extended with the function ``hello_world``. This is the key difference between creating a custom marker as a callable, which invokes ``__call__`` behind the scenes, and using ``with_args``.

Expand Down Expand Up @@ -551,7 +551,7 @@ Let's run this without capturing output and see what we get:
glob args=('class',) kwargs={'x': 2}
glob args=('module',) kwargs={'x': 1}
.
1 passed in 0.01s
1 passed in 0.02s
marking platform specific tests with pytest
--------------------------------------------------------------
Expand Down Expand Up @@ -623,7 +623,7 @@ then you will see two tests skipped and two executed tests as expected:
========================= short test summary info ==========================
SKIPPED [2] $REGENDOC_TMPDIR/conftest.py:13: cannot run on platform linux
======================= 2 passed, 2 skipped in 0.01s =======================
======================= 2 passed, 2 skipped in 0.12s =======================
Note that if you specify a platform via the marker-command line option like this:

Expand All @@ -638,7 +638,7 @@ Note that if you specify a platform via the marker-command line option like this
test_plat.py . [100%]
===================== 1 passed, 3 deselected in 0.01s ======================
===================== 1 passed, 3 deselected in 0.12s ======================
then the unmarked-tests will not be run. It is thus a way to restrict the run to the specific tests.

Expand Down Expand Up @@ -711,7 +711,7 @@ We can now use the ``-m option`` to select one set:
test_module.py:8: in test_interface_complex
assert 0
E assert 0
===================== 2 failed, 2 deselected in 0.02s ======================
===================== 2 failed, 2 deselected in 0.12s ======================
or to select both "event" and "interface" tests:

Expand Down Expand Up @@ -739,4 +739,4 @@ or to select both "event" and "interface" tests:
test_module.py:12: in test_event_simple
assert 0
E assert 0
===================== 3 failed, 1 deselected in 0.03s ======================
===================== 3 failed, 1 deselected in 0.12s ======================
6 changes: 3 additions & 3 deletions doc/en/example/nonpython.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ now execute the test specification:
usecase execution failed
spec failed: 'some': 'other'
no further details known at this point.
======================= 1 failed, 1 passed in 0.02s ========================
======================= 1 failed, 1 passed in 0.12s ========================
.. regendoc:wipe
Expand Down Expand Up @@ -77,7 +77,7 @@ consulted when reporting in ``verbose`` mode:
usecase execution failed
spec failed: 'some': 'other'
no further details known at this point.
======================= 1 failed, 1 passed in 0.02s ========================
======================= 1 failed, 1 passed in 0.12s ========================
.. regendoc:wipe
Expand All @@ -97,4 +97,4 @@ interesting to just look at the collection tree:
<YamlItem hello>
<YamlItem ok>
========================== no tests ran in 0.02s ===========================
========================== no tests ran in 0.12s ===========================
Loading

0 comments on commit e56544c

Please sign in to comment.