- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13
chore(dependencies): update dependency pytest to ^7.4.4 #156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
3b3f397    to
    7db3fb6      
    Compare
  
    7db3fb6    to
    a01da96      
    Compare
  
    39e04ac    to
    41be367      
    Compare
  
    | ⚠ Artifact update problemRenovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is. ♻ Renovate will retry this branch, including artifacts, only when one of the following happens: 
 The artifact failure details are included below: File name: poetry.lock | 
41be367    to
    2c0fac8      
    Compare
  
    2c0fac8    to
    3b99a10      
    Compare
  
    3b99a10    to
    555dbd8      
    Compare
  
    555dbd8    to
    5e38d6a      
    Compare
  
    5e38d6a    to
    14e4557      
    Compare
  
    14e4557    to
    8baa94f      
    Compare
  
    | 
 | 
This PR contains the following updates:
^7.1.2->^7.4.4Release Notes
pytest-dev/pytest (pytest)
v7.4.4: pytest 7.4.4 (2023-12-31)Compare Source
Bug Fixes
sys.stderr{.interpreted-text role="data"} andsys.__stderr__{.interpreted-text role="data"} might already be closed whenfaulthandler{.interpreted-text role="ref"} is tearing down.__iter__methods. Now they are treated un-iterable instead.Improved Documentation
--junitxmlwith--junit-xmland--collectonlywith--collect-only.v7.4.3: pytest 7.4.3 (2023-10-24)Compare Source
Bug Fixes
#10447: Markers are now considered in the reverse mro order to ensure base class markers are considered first -- this resolves a regression.
#11239: Fixed
:=in asserts impacting unrelated test cases.#11439: Handled an edge case where :data:
sys.stderrmight already be closed when :ref:faulthandleris tearing down.v7.4.2: pytest 7.4.2 (2023-09-07)Compare Source
Bug Fixes
#11237: Fix doctest collection of
functools.cached_propertyobjects.#11306: Fixed bug using
--importmode=importlibwhich would cause package__init__.pyfiles to be imported more than once in some cases.#11367: Fixed bug where
user_propertieswhere not being saved in the JUnit XML file if a fixture failed during teardown.#11394: Fixed crash when parsing long command line arguments that might be interpreted as files.
Improved Documentation
v7.4.1: pytest 7.4.1 (2023-09-02)Compare Source
Bug Fixes
#10337: Fixed bug where fake intermediate modules generated by
--import-mode=importlibwould not include thechild modules as attributes of the parent modules.
#10702: Fixed error assertion handling in
pytest.approxwhenNoneis an expected or received value when comparing dictionaries.#10811: Fixed issue when using
--import-mode=importlibtogether with--doctest-modulesthat caused modulesto be imported more than once, causing problems with modules that have import side effects.
v7.4.0Compare Source
pytest 7.4.0 (2023-06-23)
Features
ExceptionInfo.from_exception() <pytest.ExceptionInfo.from_exception>{.interpreted-text role="func"}, a simpler way to create an~pytest.ExceptionInfo{.interpreted-text role="class"} from an exception.This can replace
ExceptionInfo.from_exc_info() <pytest.ExceptionInfo.from_exc_info()>{.interpreted-text role="func"} for most uses.Improvements
#10872: Update test log report annotation to named tuple and fixed inconsistency in docs for
pytest_report_teststatus{.interpreted-text role="hook"} hook.#10907: When an exception traceback to be displayed is completely filtered out (by mechanisms such as
__tracebackhide__, internal frames, and similar), now only the exception string and the following message are shown:"All traceback entries are hidden. Pass [--full-trace]{.title-ref} to see hidden and internal frames.".
Previously, the last frame of the traceback was shown, even though it was hidden.
#10940: Improved verbose output (
-vv) ofskipandxfailreasons by performing text wrapping while leaving a clear margin for progress output.Added
TerminalReporter.wrap_write()as a helper for that.#10991: Added handling of
%fdirective to print microseconds in log format options, such aslog-date-format.#11005: Added the underlying exception to the cache provider's path creation and write warning messages.
#11013: Added warning when
testpaths{.interpreted-text role="confval"} is set, but paths are not found by glob. In this case, pytest will fall back to searching from the current directory.#11043: When [--confcutdir]{.title-ref} is not specified, and there is no config file present, the conftest cutoff directory ([--confcutdir]{.title-ref}) is now set to the
rootdir <rootdir>{.interpreted-text role="ref"}.Previously in such cases, [conftest.py]{.title-ref} files would be probed all the way to the root directory of the filesystem.
If you are badly affected by this change, consider adding an empty config file to your desired cutoff directory, or explicitly set [--confcutdir]{.title-ref}.
#11081: The
norecursedirs{.interpreted-text role="confval"} check is now performed in apytest_ignore_collect{.interpreted-text role="hook"} implementation, so plugins can affect it.If after updating to this version you see that your [norecursedirs]{.title-ref} setting is not being respected,
it means that a conftest or a plugin you use has a bad [pytest_ignore_collect]{.title-ref} implementation.
Most likely, your hook returns [False]{.title-ref} for paths it does not want to ignore,
which ends the processing and doesn't allow other plugins, including pytest itself, to ignore the path.
The fix is to return [None]{.title-ref} instead of [False]{.title-ref} for paths your hook doesn't want to ignore.
#8711:
caplog.set_level() <pytest.LogCaptureFixture.set_level>{.interpreted-text role="func"} andcaplog.at_level() <pytest.LogCaptureFixture.at_level>{.interpreted-text role="func"}will temporarily enable the requested
leveliflevelwas disabled globally vialogging.disable(LEVEL).Bug Fixes
--tb=linemode wherepytest.fail(pytrace=False)tests reportNone.--last-failedwhole-file skipping functionality ("skipped N files") fornon-python test files <non-python tests>{.interpreted-text role="ref"}.testpaths{.interpreted-text role="confval"} to be considered for loading initial conftests,even when it was not utilized (e.g. when explicit paths were given on the command line).
Now the
testpathsare only considered when they are in use.__tracebackhide__ = Truestill being shown for chained exceptions (parts after "... the above exception ..." message).--debug.Improved Documentation
caplog.set_level() <pytest.LogCaptureFixture.set_level>{.interpreted-text role="func"}.Trivial/Internal Changes
-cto now include--config-fileto make it clear that this flag applies to the usage of a custom config file.v7.3.2Compare Source
pytest 7.3.2 (2023-06-10)
Bug Fixes
OSError: [Errno 36] File name too longon some systems.testpaths{.interpreted-text role="confval"} is now honored to load rootconftests.--last-failed's "(skipped N files)" functionality for files inside of packages (directories with [__init__.py]{.title-ref} files).v7.3.1Compare Source
pytest 7.3.1 (2023-04-14)
Improvements
RuntimeError: TestResult has no addDuration methodwhen runningunittesttests.shutil.rmtree(onerror=...)deprecation warning when usingtmp_path{.interpreted-text role="fixture"}.Bug Fixes
tmp_path{.interpreted-text role="fixture"} and the newtmp_path_retention_policy{.interpreted-text role="confval"} option.INTERNALERROR IndexError: list index out of rangewhich 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.0Compare Source
pytest 7.3.0 (2023-04-08)
Features
@classmethodcan 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.console_output_style{.interpreted-text role="confval"} now supportsprogress-even-when-capture-noto 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.--log-disableCLI option added to disable individual loggers.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
ExceptionGroupof them instead of discarding all but the last.-parguments to include spaces (eg:-p no:logginginstead of-pno:logging). Mostly useful in theaddoptssection of the configurationfile.
startandstoptimestamps toTestReportobjects.rootdir,config fileandtestpathsso each has its own line.the hidden text. The line number shown has also been fixed.
Bug Fixes
tmp_path{.interpreted-text role="fixture"} fixture always raisingOSError{.interpreted-text role="class"} onemscriptenplatform due to missingos.getuid{.interpreted-text role="func"}.__tracebackhide__for chained exceptions.Improved Documentation
goodpractices{.interpreted-text role="ref"}:pip install -e .requires aversionentry inpyproject.tomlto run successfully.Trivial/Internal Changes
v7.2.2Compare Source
pytest 7.2.2 (2023-03-03)
Bug Fixes
pytest.approx{.interpreted-text role="func"} handling of dictionaries containing one or more values of [0.0]{.title-ref}.teardownwould be called as part ofnoseteardown stage.--fixturesand--helpare passed at the same time.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
about not collecting tests and not executing the rest of the module.
v7.2.1Compare Source
pytest 7.2.1 (2023-01-13)
Bug Fixes
rootdir <rootdir>{.interpreted-text role="ref"} on Windows.v7.2.0Compare Source
pytest 7.2.0 (2022-10-23)
Deprecations
#10012: Update
pytest.PytestUnhandledCoroutineWarning{.interpreted-text role="class"} to a deprecation; it will raise an error in pytest 8.#10396: pytest no longer depends on the
pylibrary.pytestprovides a vendored copy ofpy.errorandpy.pathmodules but will use thepylibrary if it is installed. If you need otherpy.*modules, continue to install the deprecatedpylibrary separately, otherwise it can usually be removed as a dependency.#4562: Deprecate configuring hook specs/impls using attributes/marks.
Instead use :py
pytest.hookimpl{.interpreted-text role="func"} and :pypytest.hookspec{.interpreted-text role="func"}.For more details, see the
docs <legacy-path-hooks-deprecated>{.interpreted-text role="ref"}.#9886: The functionality for running tests written for
nosehas been officially deprecated.This includes:
setupandteardownfunctions and methods: this might catch users by surprise, assetup()andteardown()are not pytest idioms, but part of thenosesupport.For more details, consult the
deprecation docs <nose-deprecation>{.interpreted-text role="ref"}.Features
testpaths.Improvements
#10218:
@pytest.mark.parametrize()(and similar functions) now accepts anySequence[str]for the argument names,instead of just
list[str]andtuple[str, ...].(Note that
str, which is itself aSequence[str], is still treated as acomma-delimited name list, as before).
#10381: The
--no-showlocalsflag has been added. This can be passed directly to tests to override--showlocalsdeclared throughaddopts.#3426: Assertion failures with strings in NFC and NFD forms that normalize to the same string now have a dedicated error message detailing the issue, and their utf-8 representation is expresed instead.
#7337: A warning is now emitted if a test function returns something other than [None]{.title-ref}. This prevents a common mistake among beginners that expect that returning a [bool]{.title-ref} (for example [return foo(a, b) == result]{.title-ref}) would cause a test to pass or fail, instead of using [assert]{.title-ref}.
#8508: Introduce multiline display for warning matching via :py
pytest.warns{.interpreted-text role="func"} andenhance match comparison for :py
_pytest._code.ExceptionInfo.match{.interpreted-text role="func"} as returned by :pypytest.raises{.interpreted-text role="func"}.#8646: Improve :py
pytest.raises{.interpreted-text role="func"}. Previously passing an empty tuple would give a confusingerror. We now raise immediately with a more helpful message.
#9741: On Python 3.11, use the standard library's
tomllib{.interpreted-text role="mod"} to parse TOML.tomli{.interpreted-text role="mod"}` is no longer a dependency on Python 3.11.#9742: Display assertion message without escaped newline characters with
-vv.#9823: Improved error message that is shown when no collector is found for a given file.
#9873: Some coloring has been added to the short test summary.
#9883: Normalize the help description of all command-line options.
#9920: Display full crash messages in
short test summary info, when runng in a CI environment.#9987: Added support for hidden configuration file by allowing
.pytest.inias an alternative topytest.ini.Bug Fixes
#10150:
sys.stdin{.interpreted-text role="data"} now contains all expected methods of a file-like object when capture is enabled.#10382: Do not break into pdb when
raise unittest.SkipTest()appears top-level in a file.#7792: Marks are now inherited according to the full MRO in test classes. Previously, if a test class inherited from two or more classes, only marks from the first super-class would apply.
When inheriting marks from super-classes, marks from the sub-classes are now ordered before marks from the super-classes, in MRO order. Previously it was the reverse.
When inheriting marks from super-classes, the [pytestmark]{.title-ref} attribute of the sub-class now only contains the marks directly applied to it. Previously, it also contained marks from its super-classes. Please note that this attribute should not normally be accessed directly; use
pytest.Node.iter_markers{.interpreted-text role="func"} instead.#9159: Showing inner exceptions by forcing native display in
ExceptionGroupseven when using display options other than--tb=native. A temporary step before full implementation of pytest-native display for inner exceptions inExceptionGroups.#9877: Ensure
caplog.get_records(when)returns current/correct data after invokingcaplog.clear().Improved Documentation
pyproject.tomlinstead ofsetup.py.pytest.warns{.interpreted-text role="func"} affectsDeprecationWarning{.interpreted-text role="class"}.Trivial/Internal Changes
~pytest.PytestReturnNotNoneWarning{.interpreted-text role="class"} is now a subclass of~pytest.PytestRemovedIn8Warning{.interpreted-text role="class"}: the plan is to make returning non-Nonefrom tests an error in the future._pytest.doctest.DoctestItemexportpytest.DoctestItemfortype check and runtime purposes. Made [_pytest.doctest]{.title-ref} use internal APIs
to avoid circular imports.
_pytest.compatre-exportimportlib_metadatain the eyes of type checkers.EncodingWarning) incacheprovidertorn down.
Add an additional sentence to the docstring explaining when it's not a good
idea to call getfixturevalue.
v7.1.3Compare Source
pytest 7.1.3 (2022-08-31)
Bug Fixes
--pdb,TestCase.tearDownis no longer called for tests when the class has been skipped viaunittest.skiporpytest.mark.skip..pyfiles created bypyproject.toml-based editable builds introduced in pip 21.3.--import-modeflag.FixtureRequest.paramasAnyas a stop gap measure until8073{.interpreted-text role="issue"} is fixed.rewrite.pythat seems to work fine, but was incorrect and fails in some systems.pytest.approx{.interpreted-text role="func"} when used to compare tuples.Improved Documentation
tmpdir{.interpreted-text role="fixture"} fixture is discouraged in favour oftmp_path{.interpreted-text role="fixture"}.Trivial/Internal Changes
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.