gh-102978: Fixes :func:unittest.mock.patch not enforcing function
signatures for methods decorated with @classmethod or
@staticmethod when patch is called with autospec=True.
gh-103329: Regression tests for the behaviour of
unittest.mock.PropertyMock were added.
#10875: Python 3.12 support: fixed RuntimeError: TestResult has no addDuration method when running unittest tests.
#10890: Python 3.12 support: fixed shutil.rmtree(onerror=...) deprecation warning when using tmp_path{.interpreted-text role="fixture"}.
Bug Fixes
#10896: Fixed performance regression related to tmp_path{.interpreted-text role="fixture"} and the new tmp_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.
#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 supports progress-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"} and tmp_path_retention_policy{.interpreted-text role="confval"} configuration options to control how directories created by the tmp_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 the addopts section of the configuration
file.
#10710: Added start and stop timestamps to TestReport objects.
#10727: Split the report header for rootdir, config file and testpaths so each has its own line.
#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 raising OSError{.interpreted-text role="class"} on emscripten platform due to missing os.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 a version entry in pyproject.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).
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
If you want to rebase/retry this PR, check this box
This PR has been generated by Mend Renovate. View repository job log here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
Release Notes
testing-cabal/mockv5.0.2
Compare Source
-
-
pytest-dev/pytestgh-102978: Fixes :func:unittest.mock.patch not enforcing function
signatures for methods decorated with @classmethod or
@staticmethod when patch is called with autospec=True.
gh-103329: Regression tests for the behaviour of
unittest.mock.PropertyMock were added.
v7.3.1
Compare Source
pytest 7.3.1 (2023-04-14)
Improvements
Bug Fixes
This reverts the change "Correctly handle __tracebackhide__ for chained exceptions." introduced in version 7.3.0.
v7.3.0
Compare Source
pytest 7.3.0 (2023-04-08)
Features
Improvements
-pno:logging). Mostly useful in the addopts section of the configuration
file.
the hidden text. The line number shown has also been fixed.
Bug Fixes
Improved Documentation
Trivial/Internal Changes
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
This PR has been generated by Mend Renovate. View repository job log here.