Merge branch 'main' into patch-1

This commit is contained in:
Zac Hatfield-Dodds
2023-07-04 10:17:06 -07:00
committed by GitHub
65 changed files with 659 additions and 570 deletions
+2
View File
@@ -0,0 +1,2 @@
Fixed that fake intermediate modules generated by ``--import-mode=importlib`` would not include the
child modules as attributes of the parent modules.
+2
View File
@@ -0,0 +1,2 @@
markers are now considered in the reverse mro order to ensure base class markers are considered first
this resolves a regression.
+2
View File
@@ -0,0 +1,2 @@
Fixed issue when using ``--import-mode=importlib`` together with ``--doctest-modules`` that caused modules
to be imported more than once, causing problems with modules that have import side effects.
+1
View File
@@ -0,0 +1 @@
Added a warning about modifying the root logger during tests when using ``caplog``.
+2
View File
@@ -0,0 +1,2 @@
Dropped support for Python 3.7, which `reached end-of-life on 2023-06-27
<https://devguide.python.org/versions/>`__.
+1
View File
@@ -0,0 +1 @@
``pytest.warns`` and similar functions now capture warnings when an exception is raised inside a ``with`` block.
+7
View File
@@ -0,0 +1,7 @@
:func:`pytest.warns <warns>` now re-emits unmatched warnings when the context
closes -- previously it would consume all warnings, hiding those that were not
matched by the function.
While this is a new feature, we decided to announce this as a breaking change
because many test suites are configured to error-out on warnings, and will
therefore fail on the newly-re-emitted warnings.