| 1 |
pytest-2.9.0 |
| 2 |
============ |
| 3 |
|
| 4 |
pytest is a mature Python testing tool with more than 1100 tests |
| 5 |
against itself, passing on many different interpreters and platforms. |
| 6 |
|
| 7 |
See below for the changes and see docs at: |
| 8 |
|
| 9 |
http://pytest.org |
| 10 |
|
| 11 |
As usual, you can upgrade from pypi via:: |
| 12 |
|
| 13 |
pip install -U pytest |
| 14 |
|
| 15 |
Thanks to all who contributed to this release, among them: |
| 16 |
|
| 17 |
Anatoly Bubenkov |
| 18 |
Bruno Oliveira |
| 19 |
Buck Golemon |
| 20 |
David Vierra |
| 21 |
Florian Bruhin |
| 22 |
Galaczi Endre |
| 23 |
Georgy Dyuldin |
| 24 |
Lukas Bednar |
| 25 |
Luke Murphy |
| 26 |
Marcin Biernat |
| 27 |
Matt Williams |
| 28 |
Michael Aquilina |
| 29 |
Raphael Pierzina |
| 30 |
Ronny Pfannschmidt |
| 31 |
Ryan Wooden |
| 32 |
Tiemo Kieft |
| 33 |
TomV |
| 34 |
holger krekel |
| 35 |
jab |
| 36 |
|
| 37 |
|
| 38 |
Happy testing, |
| 39 |
The py.test Development Team |
| 40 |
|
| 41 |
|
| 42 |
2.9.0 (compared to 2.8.7) |
| 43 |
------------------------- |
| 44 |
|
| 45 |
**New Features** |
| 46 |
|
| 47 |
* New ``pytest.mark.skip`` mark, which unconditionally skips marked tests. |
| 48 |
Thanks :user:`MichaelAquilina` for the complete PR (:pull:`1040`). |
| 49 |
|
| 50 |
* ``--doctest-glob`` may now be passed multiple times in the command-line. |
| 51 |
Thanks :user:`jab` and :user:`nicoddemus` for the PR. |
| 52 |
|
| 53 |
* New ``-rp`` and ``-rP`` reporting options give the summary and full output |
| 54 |
of passing tests, respectively. Thanks to :user:`codewarrior0` for the PR. |
| 55 |
|
| 56 |
* ``pytest.mark.xfail`` now has a ``strict`` option which makes ``XPASS`` |
| 57 |
tests to fail the test suite, defaulting to ``False``. There's also a |
| 58 |
``xfail_strict`` ini option that can be used to configure it project-wise. |
| 59 |
Thanks :user:`rabbbit` for the request and :user:`nicoddemus` for the PR (:issue:`1355`). |
| 60 |
|
| 61 |
* ``Parser.addini`` now supports options of type ``bool``. Thanks |
| 62 |
:user:`nicoddemus` for the PR. |
| 63 |
|
| 64 |
* New ``ALLOW_BYTES`` doctest option strips ``b`` prefixes from byte strings |
| 65 |
in doctest output (similar to ``ALLOW_UNICODE``). |
| 66 |
Thanks :user:`jaraco` for the request and :user:`nicoddemus` for the PR (:issue:`1287`). |
| 67 |
|
| 68 |
* give a hint on KeyboardInterrupt to use the --fulltrace option to show the errors, |
| 69 |
this fixes :issue:`1366`. |
| 70 |
Thanks to :user:`hpk42` for the report and :user:`RonnyPfannschmidt` for the PR. |
| 71 |
|
| 72 |
* catch IndexError exceptions when getting exception source location. This fixes |
| 73 |
pytest internal error for dynamically generated code (fixtures and tests) |
| 74 |
where source lines are fake by intention |
| 75 |
|
| 76 |
**Changes** |
| 77 |
|
| 78 |
* **Important**: `py.code <https://pylib.readthedocs.io/en/stable/code.html>`_ has been |
| 79 |
merged into the ``pytest`` repository as ``pytest._code``. This decision |
| 80 |
was made because ``py.code`` had very few uses outside ``pytest`` and the |
| 81 |
fact that it was in a different repository made it difficult to fix bugs on |
| 82 |
its code in a timely manner. The team hopes with this to be able to better |
| 83 |
refactor out and improve that code. |
| 84 |
This change shouldn't affect users, but it is useful to let users aware |
| 85 |
if they encounter any strange behavior. |
| 86 |
|
| 87 |
Keep in mind that the code for ``pytest._code`` is **private** and |
| 88 |
**experimental**, so you definitely should not import it explicitly! |
| 89 |
|
| 90 |
Please note that the original ``py.code`` is still available in |
| 91 |
`pylib <https://pylib.readthedocs.io/en/stable/>`_. |
| 92 |
|
| 93 |
* ``pytest_enter_pdb`` now optionally receives the pytest config object. |
| 94 |
Thanks :user:`nicoddemus` for the PR. |
| 95 |
|
| 96 |
* Removed code and documentation for Python 2.5 or lower versions, |
| 97 |
including removal of the obsolete ``_pytest.assertion.oldinterpret`` module. |
| 98 |
Thanks :user:`nicoddemus` for the PR (:issue:`1226`). |
| 99 |
|
| 100 |
* Comparisons now always show up in full when ``CI`` or ``BUILD_NUMBER`` is |
| 101 |
found in the environment, even when -vv isn't used. |
| 102 |
Thanks :user:`The-Compiler` for the PR. |
| 103 |
|
| 104 |
* ``--lf`` and ``--ff`` now support long names: ``--last-failed`` and |
| 105 |
``--failed-first`` respectively. |
| 106 |
Thanks :user:`MichaelAquilina` for the PR. |
| 107 |
|
| 108 |
* Added expected exceptions to pytest.raises fail message |
| 109 |
|
| 110 |
* Collection only displays progress ("collecting X items") when in a terminal. |
| 111 |
This avoids cluttering the output when using ``--color=yes`` to obtain |
| 112 |
colors in CI integrations systems (:issue:`1397`). |
| 113 |
|
| 114 |
**Bug Fixes** |
| 115 |
|
| 116 |
* The ``-s`` and ``-c`` options should now work under ``xdist``; |
| 117 |
``Config.fromdictargs`` now represents its input much more faithfully. |
| 118 |
Thanks to :user:`bukzor` for the complete PR (:issue:`680`). |
| 119 |
|
| 120 |
* Fix (:issue:`1290`): support Python 3.5's ``@`` operator in assertion rewriting. |
| 121 |
Thanks :user:`Shinkenjoe` for report with test case and :user:`tomviner` for the PR. |
| 122 |
|
| 123 |
* Fix formatting utf-8 explanation messages (:issue:`1379`). |
| 124 |
Thanks :user:`biern` for the PR. |
| 125 |
|
| 126 |
* Fix `traceback style docs`_ to describe all of the available options |
| 127 |
(auto/long/short/line/native/no), with ``auto`` being the default since v2.6. |
| 128 |
Thanks :user:`hackebrot` for the PR. |
| 129 |
|
| 130 |
* Fix (:issue:`1422`): junit record_xml_property doesn't allow multiple records |
| 131 |
with same name. |
| 132 |
|
| 133 |
|
| 134 |
.. _`traceback style docs`: https://pytest.org/en/stable/how-to/output.html#modifying-python-traceback-printing |