summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_monitoring.py
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2023-07-27 14:47:33 (GMT)
committerGitHub <noreply@github.com>2023-07-27 14:47:33 (GMT)
commitac7a0f858a8d0c6ca2e64bb880fca40e229d267a (patch)
treef9765cb1e1508018aeaa3259ef3eb431d263e6cc /Lib/test/test_monitoring.py
parent9a7204b86bdb3e26c2a62aeaafb875275500b9f7 (diff)
downloadcpython-ac7a0f858a8d0c6ca2e64bb880fca40e229d267a.zip
cpython-ac7a0f858a8d0c6ca2e64bb880fca40e229d267a.tar.gz
cpython-ac7a0f858a8d0c6ca2e64bb880fca40e229d267a.tar.bz2
GH-106898: Add the exception as an argument to the `PY_UNWIND` event callback function. (GH-107347)
Diffstat (limited to 'Lib/test/test_monitoring.py')
-rw-r--r--Lib/test/test_monitoring.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_monitoring.py b/Lib/test/test_monitoring.py
index 7098f48..b36382c 100644
--- a/Lib/test/test_monitoring.py
+++ b/Lib/test/test_monitoring.py
@@ -715,7 +715,7 @@ class CheckEvents(MonitoringTestBase, unittest.TestCase):
self.assertIn(r0, ("raise", "reraise"))
h0 = h[0]
self.assertIn(h0, ("handled", "unwind"))
-
+ self.assertEqual(r[1], h[1])
class StopiterationRecorder(ExceptionRecorder):
@@ -733,8 +733,8 @@ class UnwindRecorder(ExceptionRecorder):
event_type = E.PY_UNWIND
- def __call__(self, *args):
- self.events.append(("unwind", None))
+ def __call__(self, code, offset, exc):
+ self.events.append(("unwind", type(exc)))
class ExceptionHandledRecorder(ExceptionRecorder):