Bump pytest from 7.4.4 to 8.1.2
Bumps pytest from 7.4.4 to 8.1.2.
Release notes
Sourced from pytest's releases.
8.1.2
pytest 8.1.2 (2024-04-26)
Bug Fixes
- #12114: Fixed error in
pytest.approx
{.interpreted-text role="func"} when used with [numpy]{.title-ref} arrays and comparing with other types.8.1.1
pytest 8.1.1 (2024-03-08)
::: {.note} ::: {.title} Note :::
This release is not a usual bug fix release -- it contains features and improvements, being a follow up to
8.1.0
, which has been yanked from PyPI. :::Features
#11475: Added the new
consider_namespace_packages
{.interpreted-text role="confval"} configuration option, defaulting toFalse
.If set to
True
, pytest will attempt to identify modules that are part of namespace packages when importing modules.#11653: Added the new
verbosity_test_cases
{.interpreted-text role="confval"} configuration option for fine-grained control of test execution verbosity. SeeFine-grained verbosity <pytest.fine_grained_verbosity>
{.interpreted-text role="ref"} for more details.Improvements
#10865:
pytest.warns
{.interpreted-text role="func"} now validates thatwarnings.warn
{.interpreted-text role="func"} was called with a [str]{.title-ref} or a [Warning]{.title-ref}. Currently in Python it is possible to use other types, however this causes an exception whenwarnings.filterwarnings
{.interpreted-text role="func"} is used to filter those warnings (see [CPython #103577](python/cpython#103577) for a discussion). While this can be considered a bug in CPython, we decided to put guards in pytest as the error message produced without this check in place is confusing.#11311: When using
--override-ini
for paths in invocations without a configuration file defined, the current working directory is used as the relative directory.Previoulsy this would raise an
AssertionError
{.interpreted-text role="class"}.#11475:
--import-mode=importlib <import-mode-importlib>
{.interpreted-text role="ref"} now tries to import modules using the standard import mechanism (but still without changing :pysys.path
{.interpreted-text role="data"}), falling back to importing modules directly only if that fails.This means that installed packages will be imported under their canonical name if possible first, for example
app.core.models
, instead of having the module name always be derived from their path (for example.env310.lib.site_packages.app.core.models
).#11801: Added the
iter_parents() <_pytest.nodes.Node.iter_parents>
{.interpreted-text role="func"} helper method on nodes. It is similar tolistchain <_pytest.nodes.Node.listchain>
{.interpreted-text role="func"}, but goes from bottom to top, and returns an iterator, not a list.
... (truncated)
Commits
-
cf84163
Prepare release version 8.1.2 -
0675383
[8.1.x] Fixed Bug Regarding Attribute Error in pytest.approx For Types Implic... -
a43b098
[8.1.x] Update events/trainings (#12237) -
f55c660
[8.1.x] doc:import pytest
inconftest.py
example indoctest.rst
(#12182) -
be7c8be
[8.1.x] Add research item in doc (#12148) -
c5e3921
[8.1.x] doc: add versionadded toExceptionInfo.group_contains
(#12142) -
83614e1
[8.1.x] doc: fix typos (#12119) -
cd585a1
[8.1.x] doc: add versionadded toStash
andStashKey
(#12109) -
6c14139
[8.1.x] doc/flaky: removebox/flaky
plugin suggestion (#12102) -
abb0cf4
Merge pull request #12094 from pytest-dev/release-8.1.1 - Additional commits viewable in compare view