2016-03-01 04:46:32 +08:00
|
|
|
pytest-2.9.0
|
|
|
|
============
|
|
|
|
|
2020-07-29 23:19:33 +08:00
|
|
|
pytest is a mature Python testing tool with more than 1100 tests
|
2016-03-01 04:46:32 +08:00
|
|
|
against itself, passing on many different interpreters and platforms.
|
|
|
|
|
|
|
|
See below for the changes and see docs at:
|
|
|
|
|
|
|
|
http://pytest.org
|
|
|
|
|
|
|
|
As usual, you can upgrade from pypi via::
|
|
|
|
|
|
|
|
pip install -U pytest
|
|
|
|
|
|
|
|
Thanks to all who contributed to this release, among them:
|
|
|
|
|
2018-05-18 16:19:46 +08:00
|
|
|
Anatoly Bubenkov
|
|
|
|
Bruno Oliveira
|
|
|
|
Buck Golemon
|
|
|
|
David Vierra
|
|
|
|
Florian Bruhin
|
|
|
|
Galaczi Endre
|
|
|
|
Georgy Dyuldin
|
|
|
|
Lukas Bednar
|
|
|
|
Luke Murphy
|
|
|
|
Marcin Biernat
|
|
|
|
Matt Williams
|
|
|
|
Michael Aquilina
|
|
|
|
Raphael Pierzina
|
|
|
|
Ronny Pfannschmidt
|
|
|
|
Ryan Wooden
|
|
|
|
Tiemo Kieft
|
|
|
|
TomV
|
|
|
|
holger krekel
|
|
|
|
jab
|
2016-03-01 04:46:32 +08:00
|
|
|
|
|
|
|
|
|
|
|
Happy testing,
|
|
|
|
The py.test Development Team
|
|
|
|
|
|
|
|
|
|
|
|
2.9.0 (compared to 2.8.7)
|
|
|
|
-------------------------
|
|
|
|
|
|
|
|
**New Features**
|
|
|
|
|
2016-03-01 05:48:28 +08:00
|
|
|
* New ``pytest.mark.skip`` mark, which unconditionally skips marked tests.
|
2021-10-24 23:57:38 +08:00
|
|
|
Thanks `@MichaelAquilina`_ for the complete PR (:pull:`1040`).
|
2016-03-01 04:46:32 +08:00
|
|
|
|
|
|
|
* ``--doctest-glob`` may now be passed multiple times in the command-line.
|
|
|
|
Thanks `@jab`_ and `@nicoddemus`_ for the PR.
|
|
|
|
|
|
|
|
* New ``-rp`` and ``-rP`` reporting options give the summary and full output
|
|
|
|
of passing tests, respectively. Thanks to `@codewarrior0`_ for the PR.
|
|
|
|
|
|
|
|
* ``pytest.mark.xfail`` now has a ``strict`` option which makes ``XPASS``
|
|
|
|
tests to fail the test suite, defaulting to ``False``. There's also a
|
|
|
|
``xfail_strict`` ini option that can be used to configure it project-wise.
|
2021-11-06 17:16:11 +08:00
|
|
|
Thanks `@rabbbit`_ for the request and `@nicoddemus`_ for the PR (:issue:`1355`).
|
2016-03-01 04:46:32 +08:00
|
|
|
|
|
|
|
* ``Parser.addini`` now supports options of type ``bool``. Thanks
|
|
|
|
`@nicoddemus`_ for the PR.
|
|
|
|
|
|
|
|
* New ``ALLOW_BYTES`` doctest option strips ``b`` prefixes from byte strings
|
|
|
|
in doctest output (similar to ``ALLOW_UNICODE``).
|
2021-11-06 17:16:11 +08:00
|
|
|
Thanks `@jaraco`_ for the request and `@nicoddemus`_ for the PR (:issue:`1287`).
|
2016-03-01 04:46:32 +08:00
|
|
|
|
|
|
|
* give a hint on KeyboardInterrupt to use the --fulltrace option to show the errors,
|
2021-11-06 17:16:11 +08:00
|
|
|
this fixes :issue:`1366`.
|
2016-03-01 04:46:32 +08:00
|
|
|
Thanks to `@hpk42`_ for the report and `@RonnyPfannschmidt`_ for the PR.
|
|
|
|
|
|
|
|
* catch IndexError exceptions when getting exception source location. This fixes
|
|
|
|
pytest internal error for dynamically generated code (fixtures and tests)
|
|
|
|
where source lines are fake by intention
|
|
|
|
|
|
|
|
**Changes**
|
|
|
|
|
2019-07-16 03:44:20 +08:00
|
|
|
* **Important**: `py.code <https://pylib.readthedocs.io/en/stable/code.html>`_ has been
|
2018-05-18 16:19:46 +08:00
|
|
|
merged into the ``pytest`` repository as ``pytest._code``. This decision
|
|
|
|
was made because ``py.code`` had very few uses outside ``pytest`` and the
|
|
|
|
fact that it was in a different repository made it difficult to fix bugs on
|
2016-03-01 04:46:32 +08:00
|
|
|
its code in a timely manner. The team hopes with this to be able to better
|
|
|
|
refactor out and improve that code.
|
|
|
|
This change shouldn't affect users, but it is useful to let users aware
|
|
|
|
if they encounter any strange behavior.
|
2018-05-18 16:19:46 +08:00
|
|
|
|
|
|
|
Keep in mind that the code for ``pytest._code`` is **private** and
|
2016-03-01 04:46:32 +08:00
|
|
|
**experimental**, so you definitely should not import it explicitly!
|
|
|
|
|
2018-05-18 16:19:46 +08:00
|
|
|
Please note that the original ``py.code`` is still available in
|
2019-07-16 03:44:20 +08:00
|
|
|
`pylib <https://pylib.readthedocs.io/en/stable/>`_.
|
2016-03-01 04:46:32 +08:00
|
|
|
|
|
|
|
* ``pytest_enter_pdb`` now optionally receives the pytest config object.
|
|
|
|
Thanks `@nicoddemus`_ for the PR.
|
|
|
|
|
|
|
|
* Removed code and documentation for Python 2.5 or lower versions,
|
|
|
|
including removal of the obsolete ``_pytest.assertion.oldinterpret`` module.
|
2021-11-06 17:16:11 +08:00
|
|
|
Thanks `@nicoddemus`_ for the PR (:issue:`1226`).
|
2016-03-01 04:46:32 +08:00
|
|
|
|
|
|
|
* Comparisons now always show up in full when ``CI`` or ``BUILD_NUMBER`` is
|
|
|
|
found in the environment, even when -vv isn't used.
|
|
|
|
Thanks `@The-Compiler`_ for the PR.
|
|
|
|
|
|
|
|
* ``--lf`` and ``--ff`` now support long names: ``--last-failed`` and
|
|
|
|
``--failed-first`` respectively.
|
|
|
|
Thanks `@MichaelAquilina`_ for the PR.
|
|
|
|
|
|
|
|
* Added expected exceptions to pytest.raises fail message
|
|
|
|
|
|
|
|
* Collection only displays progress ("collecting X items") when in a terminal.
|
|
|
|
This avoids cluttering the output when using ``--color=yes`` to obtain
|
2021-11-06 17:16:11 +08:00
|
|
|
colors in CI integrations systems (:issue:`1397`).
|
2016-03-01 04:46:32 +08:00
|
|
|
|
|
|
|
**Bug Fixes**
|
|
|
|
|
|
|
|
* The ``-s`` and ``-c`` options should now work under ``xdist``;
|
|
|
|
``Config.fromdictargs`` now represents its input much more faithfully.
|
2021-11-06 17:16:11 +08:00
|
|
|
Thanks to `@bukzor`_ for the complete PR (:issue:`680`).
|
2016-03-01 04:46:32 +08:00
|
|
|
|
2021-11-06 17:16:11 +08:00
|
|
|
* Fix (:issue:`1290`): support Python 3.5's ``@`` operator in assertion rewriting.
|
2016-03-01 04:46:32 +08:00
|
|
|
Thanks `@Shinkenjoe`_ for report with test case and `@tomviner`_ for the PR.
|
|
|
|
|
2021-11-06 17:16:11 +08:00
|
|
|
* Fix formatting utf-8 explanation messages (:issue:`1379`).
|
2016-03-01 04:46:32 +08:00
|
|
|
Thanks `@biern`_ for the PR.
|
|
|
|
|
|
|
|
* Fix `traceback style docs`_ to describe all of the available options
|
2018-07-05 06:16:34 +08:00
|
|
|
(auto/long/short/line/native/no), with ``auto`` being the default since v2.6.
|
2016-03-01 04:46:32 +08:00
|
|
|
Thanks `@hackebrot`_ for the PR.
|
|
|
|
|
2021-11-06 17:16:11 +08:00
|
|
|
* Fix (:issue:`1422`): junit record_xml_property doesn't allow multiple records
|
2016-03-01 04:46:32 +08:00
|
|
|
with same name.
|
2018-05-18 16:19:46 +08:00
|
|
|
|
|
|
|
|
2021-07-06 15:09:04 +08:00
|
|
|
.. _`traceback style docs`: https://pytest.org/en/stable/how-to/output.html#modifying-python-traceback-printing
|
2016-03-01 04:46:32 +08:00
|
|
|
|
2021-11-06 17:16:11 +08:00
|
|
|
|
2016-03-01 04:46:32 +08:00
|
|
|
.. _@biern: https://github.com/biern
|
|
|
|
.. _@MichaelAquilina: https://github.com/MichaelAquilina
|
|
|
|
.. _@bukzor: https://github.com/bukzor
|
|
|
|
.. _@hpk42: https://github.com/hpk42
|
|
|
|
.. _@nicoddemus: https://github.com/nicoddemus
|
|
|
|
.. _@jab: https://github.com/jab
|
|
|
|
.. _@codewarrior0: https://github.com/codewarrior0
|
|
|
|
.. _@jaraco: https://github.com/jaraco
|
|
|
|
.. _@The-Compiler: https://github.com/The-Compiler
|
|
|
|
.. _@Shinkenjoe: https://github.com/Shinkenjoe
|
|
|
|
.. _@tomviner: https://github.com/tomviner
|
|
|
|
.. _@RonnyPfannschmidt: https://github.com/RonnyPfannschmidt
|
|
|
|
.. _@rabbbit: https://github.com/rabbbit
|
2018-05-18 15:27:51 +08:00
|
|
|
.. _@hackebrot: https://github.com/hackebrot
|