capture warning when exception is raised (fix #9036)

This commit is contained in:
Cheukting
2023-06-22 16:48:20 +01:00
committed by Zac Hatfield-Dodds
parent 679bd6f2ed
commit 15524f34d2
3 changed files with 13 additions and 21 deletions

View File

@@ -298,11 +298,6 @@ class WarningsChecker(WarningsRecorder):
# nothing to do in this deprecated case, see WARNS_NONE_ARG above
return
if not (exc_type is None and exc_val is None and exc_tb is None):
# We currently ignore missing warnings if an exception is active.
# TODO: fix this, because it means things are surprisingly order-sensitive.
return
def found_str():
return pformat([record.message for record in self], indent=2)