From 6badb6f01e355633eda251d037b48e39a4ed89dc Mon Sep 17 00:00:00 2001 From: Milan Lesnek Date: Tue, 4 Jul 2023 08:59:58 +0200 Subject: [PATCH] Apply suggestions from code review chore(changelog): describe better the fix Co-authored-by: Zac Hatfield-Dodds --- changelog/10701.bugfix.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/changelog/10701.bugfix.rst b/changelog/10701.bugfix.rst index d02ddacab..f33fa7fb2 100644 --- a/changelog/10701.bugfix.rst +++ b/changelog/10701.bugfix.rst @@ -1 +1,2 @@ -``pytest.WarningsRecorder.pop`` now also pop most recent subclass of warning. +:meth:`pytest.WarningsRecorder.pop` will return the most-closely-matched warning in the list, +rather than the first warning which is an instance of the requested type.