Merge pull request #11864 from bluetech/release-8.0.0

Prepare release version 8.0.0

(cherry picked from commit 24c681d4eeaad22ba26c5bcf6958e0476ae37a89)
This commit is contained in:
Ran Benita 2024-01-27 23:55:26 +02:00
parent a164ed6400
commit c6da0d20d2
10 changed files with 50 additions and 13 deletions

View File

@ -1 +0,0 @@
Properly escape the ``reason`` of a :ref:`skip <pytest.mark.skip ref>` mark when writing JUnit XML files.

View File

@ -1 +0,0 @@
Avoid microsecond exceeds ``1_000_000`` when using ``log-date-format`` with ``%f`` specifier, which might cause the test suite to crash.

View File

@ -6,6 +6,7 @@ Release announcements
:maxdepth: 2 :maxdepth: 2
release-8.0.0
release-8.0.0rc2 release-8.0.0rc2
release-8.0.0rc1 release-8.0.0rc1
release-7.4.4 release-7.4.4

View File

@ -0,0 +1,26 @@
pytest-8.0.0
=======================================
The pytest team is proud to announce the 8.0.0 release!
This release contains new features, improvements, bug fixes, and breaking changes, so users
are encouraged to take a look at the CHANGELOG carefully:
https://docs.pytest.org/en/stable/changelog.html
For complete documentation, please visit:
https://docs.pytest.org/en/stable/
As usual, you can upgrade from PyPI via:
pip install -U pytest
Thanks to all of the contributors to this release:
* Bruno Oliveira
* Ran Benita
Happy testing,
The pytest Development Team

View File

@ -129,7 +129,7 @@ For information about fixtures, see :ref:`fixtures`. To see a complete list of a
if pytestconfig.getoption("verbose") > 0: if pytestconfig.getoption("verbose") > 0:
... ...
record_property -- .../_pytest/junitxml.py:282 record_property -- .../_pytest/junitxml.py:284
Add extra properties to the calling test. Add extra properties to the calling test.
User properties become part of the test report and are available to the User properties become part of the test report and are available to the
@ -143,13 +143,13 @@ For information about fixtures, see :ref:`fixtures`. To see a complete list of a
def test_function(record_property): def test_function(record_property):
record_property("example_key", 1) record_property("example_key", 1)
record_xml_attribute -- .../_pytest/junitxml.py:305 record_xml_attribute -- .../_pytest/junitxml.py:307
Add extra xml attributes to the tag for the calling test. Add extra xml attributes to the tag for the calling test.
The fixture is callable with ``name, value``. The value is The fixture is callable with ``name, value``. The value is
automatically XML-encoded. automatically XML-encoded.
record_testsuite_property [session scope] -- .../_pytest/junitxml.py:343 record_testsuite_property [session scope] -- .../_pytest/junitxml.py:345
Record a new ``<property>`` tag as child of the root ``<testsuite>``. Record a new ``<property>`` tag as child of the root ``<testsuite>``.
This is suitable to writing global information regarding the entire test This is suitable to writing global information regarding the entire test
@ -196,7 +196,7 @@ For information about fixtures, see :ref:`fixtures`. To see a complete list of a
.. _legacy_path: https://py.readthedocs.io/en/latest/path.html .. _legacy_path: https://py.readthedocs.io/en/latest/path.html
caplog -- .../_pytest/logging.py:593 caplog -- .../_pytest/logging.py:594
Access and control log capturing. Access and control log capturing.
Captured logs are available through the following properties/methods:: Captured logs are available through the following properties/methods::

View File

@ -28,6 +28,18 @@ with advance notice in the **Deprecations** section of releases.
.. towncrier release notes start .. towncrier release notes start
pytest 8.0.0 (2024-01-27)
=========================
Bug Fixes
---------
- `#11842 <https://github.com/pytest-dev/pytest/issues/11842>`_: Properly escape the ``reason`` of a :ref:`skip <pytest.mark.skip ref>` mark when writing JUnit XML files.
- `#11861 <https://github.com/pytest-dev/pytest/issues/11861>`_: Avoid microsecond exceeds ``1_000_000`` when using ``log-date-format`` with ``%f`` specifier, which might cause the test suite to crash.
pytest 8.0.0rc2 (2024-01-17) pytest 8.0.0rc2 (2024-01-17)
============================ ============================

View File

@ -162,7 +162,7 @@ objects, they are still using the default pytest representation:
rootdir: /home/sweet/project rootdir: /home/sweet/project
collected 8 items collected 8 items
<Dir parametrize.rst-192> <Dir parametrize.rst-193>
<Module test_time.py> <Module test_time.py>
<Function test_timedistance_v0[a0-b0-expected0]> <Function test_timedistance_v0[a0-b0-expected0]>
<Function test_timedistance_v0[a1-b1-expected1]> <Function test_timedistance_v0[a1-b1-expected1]>
@ -239,7 +239,7 @@ If you just collect tests you'll also nicely see 'advanced' and 'basic' as varia
rootdir: /home/sweet/project rootdir: /home/sweet/project
collected 4 items collected 4 items
<Dir parametrize.rst-192> <Dir parametrize.rst-193>
<Module test_scenarios.py> <Module test_scenarios.py>
<Class TestSampleWithScenarios> <Class TestSampleWithScenarios>
<Function test_demo1[basic]> <Function test_demo1[basic]>
@ -318,7 +318,7 @@ Let's first see how it looks like at collection time:
rootdir: /home/sweet/project rootdir: /home/sweet/project
collected 2 items collected 2 items
<Dir parametrize.rst-192> <Dir parametrize.rst-193>
<Module test_backends.py> <Module test_backends.py>
<Function test_db_initialized[d1]> <Function test_db_initialized[d1]>
<Function test_db_initialized[d2]> <Function test_db_initialized[d2]>

View File

@ -152,7 +152,7 @@ The test collection would look like this:
configfile: pytest.ini configfile: pytest.ini
collected 2 items collected 2 items
<Dir pythoncollection.rst-193> <Dir pythoncollection.rst-194>
<Module check_myapp.py> <Module check_myapp.py>
<Class CheckMyApp> <Class CheckMyApp>
<Function simple_check> <Function simple_check>
@ -215,7 +215,7 @@ You can always peek at the collection tree without running tests like this:
configfile: pytest.ini configfile: pytest.ini
collected 3 items collected 3 items
<Dir pythoncollection.rst-193> <Dir pythoncollection.rst-194>
<Dir CWD> <Dir CWD>
<Module pythoncollection.py> <Module pythoncollection.py>
<Function test_function> <Function test_function>

View File

@ -22,7 +22,7 @@ Install ``pytest``
.. code-block:: bash .. code-block:: bash
$ pytest --version $ pytest --version
pytest 8.0.0rc2 pytest 8.0.0
.. _`simpletest`: .. _`simpletest`:

View File

@ -1418,7 +1418,7 @@ Running the above tests results in the following test IDs being used:
rootdir: /home/sweet/project rootdir: /home/sweet/project
collected 12 items collected 12 items
<Dir fixtures.rst-211> <Dir fixtures.rst-212>
<Module test_anothersmtp.py> <Module test_anothersmtp.py>
<Function test_showhelo[smtp.gmail.com]> <Function test_showhelo[smtp.gmail.com]>
<Function test_showhelo[mail.python.org]> <Function test_showhelo[mail.python.org]>