machinable
machinable copied to clipboard
:arrow_up: Bump pytest from 7.1.3 to 7.2.0
Bumps pytest from 7.1.3 to 7.2.0.
Release notes
Sourced from pytest's releases.
7.2.0
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 thedocs <legacy-path-hooks-deprecated>{.interpreted-text role="ref"}.#9886: The functionality for running tests written for
nosehas been officially deprecated.This includes:
- Plain
setupandteardownfunctions and methods: this might catch users by surprise, assetup()andteardown()are not pytest idioms, but part of thenosesupport.- Setup/teardown using the
@with_setupdecorator.For more details, consult the
deprecation docs <nose-deprecation>{.interpreted-text role="ref"}.Features
- #9897: Added shell-style wildcard support to
testpaths.Improvements
#10218:
@pytest.mark.parametrize()(and similar functions) now accepts anySequence[str]for the argument names, instead of justlist[str]andtuple[str, ...].(Note that
str, which is itself aSequence[str], is still treated as a comma-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"} and enhance 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 confusing error. 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.
... (truncated)
Commits
3af3f56Prepare release version 7.2.0bc2c3b6Merge pull request #10408 from NateMeyvis/patch-2d84ed48Merge pull request #10409 from pytest-dev/asottile-patch-1ffe49acMerge pull request #10396 from pytest-dev/pylib-haxd352098allow jobs to pass if codecov.io failsc5c562bFix typos in CONTRIBUTING.rstd543a45add deprecation changelog for py library vendoringf341a5cMerge pull request #10407 from NateMeyvis/patch-11027dc8[pre-commit.ci] auto fixes from pre-commit.com hooks6b905eeAdd note on tags to CONTRIBUTING.rst- Additional commits viewable in compare view
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)