chore(deps): update dependency pytest to v7.3.1
This MR contains the following updates:
Package | Change | Age | Adoption | Passing | Confidence |
---|---|---|---|---|---|
pytest (source, changelog) |
7.2.1 -> 7.3.1
|
Release Notes
pytest-dev/pytest
v7.3.1
pytest 7.3.1 (2023-04-14)
Improvements
-
#10875: Python 3.12 support: fixed
RuntimeError: TestResult has no addDuration method
when runningunittest
tests. -
#10890: Python 3.12 support: fixed
shutil.rmtree(onerror=...)
deprecation warning when usingtmp_path
{.interpreted-text role="fixture"}.
Bug Fixes
-
#10896: Fixed performance regression related to
tmp_path
{.interpreted-text role="fixture"} and the newtmp_path_retention_policy
{.interpreted-text role="confval"} option. -
#10903: Fix crash
INTERNALERROR IndexError: list index out of range
which happens when displaying an exception where all entries are hidden. This reverts the change "Correctly handle__tracebackhide__
for chained exceptions." introduced in version 7.3.0.
v7.3.0
pytest 7.3.0 (2023-04-08)
Features
-
#10525: Test methods decorated with
@classmethod
can now be discovered as tests, following the same rules as normal methods. This fills the gap that static methods were discoverable as tests but not class methods. -
#10755:
console_output_style
{.interpreted-text role="confval"} now supportsprogress-even-when-capture-no
to force the use of the progress output even when capture is disabled. This is useful in large test suites where capture may have significant performance impact. -
#7431:
--log-disable
CLI option added to disable individual loggers. -
#8141: Added
tmp_path_retention_count
{.interpreted-text role="confval"} andtmp_path_retention_policy
{.interpreted-text role="confval"} configuration options to control how directories created by thetmp_path
{.interpreted-text role="fixture"} fixture are kept.
Improvements
-
#10226: If multiple errors are raised in teardown, we now re-raise an
ExceptionGroup
of them instead of discarding all but the last. -
#10658: Allow
-p
arguments to include spaces (eg:-p no:logging
instead of-pno:logging
). Mostly useful in theaddopts
section of the configuration file. -
#10710: Added
start
andstop
timestamps toTestReport
objects. -
#10727: Split the report header for
rootdir
,config file
andtestpaths
so each has its own line. - #10840: pytest should no longer crash on AST with pathological position attributes, for example testing AST produced by [Hylang __]{.title-ref}.
- #6267: The full output of a test is no longer truncated if the truncation message would be longer than the hidden text. The line number shown has also been fixed.
Bug Fixes
- #10743: The assertion rewriting mechanism now works correctly when assertion expressions contain the walrus operator.
-
#10765: Fixed
tmp_path
{.interpreted-text role="fixture"} fixture always raisingOSError
{.interpreted-text role="class"} onemscripten
platform due to missingos.getuid
{.interpreted-text role="func"}. -
#1904: Correctly handle
__tracebackhide__
for chained exceptions.
Improved Documentation
-
#10782: Fixed the minimal example in
goodpractices
{.interpreted-text role="ref"}:pip install -e .
requires aversion
entry inpyproject.toml
to run successfully.
Trivial/Internal Changes
- #10669: pytest no longer depends on the [attrs]{.title-ref} package (don't worry, nice diffs for attrs classes are still supported).
v7.2.2
pytest 7.2.2 (2023-03-03)
Bug Fixes
-
#10533: Fixed
pytest.approx
{.interpreted-text role="func"} handling of dictionaries containing one or more values of [0.0]{.title-ref}. - #10592: Fixed crash if [--cache-show]{.title-ref} and [--help]{.title-ref} are passed at the same time.
-
#10597: Fixed bug where a fixture method named
teardown
would be called as part ofnose
teardown stage. -
#10626: Fixed crash if
--fixtures
and--help
are passed at the same time. -
#10660: Fixed :py
pytest.raises
{.interpreted-text role="func"} to return a 'ContextManager' so that type-checkers could narrowpytest.raises(...) if ... else nullcontext()
down to 'ContextManager' rather than 'object'.
Improved Documentation
- #10690: Added [CI]{.title-ref} and [BUILD_NUMBER]{.title-ref} environment variables to the documentation.
- #10721: Fixed entry-points declaration in the documentation example using Hatch.
- #10753: Changed wording of the module level skip to be very explicit about not collecting tests and not executing the rest of the module.
Configuration
-
If you want to rebase/retry this MR, check this box
This MR has been generated by Renovate Bot.
Edited by Renovate Bot