diff options
author | Mark Shannon <mark@hotpy.org> | 2023-07-27 14:47:33 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-27 14:47:33 (GMT) |
commit | ac7a0f858a8d0c6ca2e64bb880fca40e229d267a (patch) | |
tree | f9765cb1e1508018aeaa3259ef3eb431d263e6cc /Lib/test/test_monitoring.py | |
parent | 9a7204b86bdb3e26c2a62aeaafb875275500b9f7 (diff) | |
download | cpython-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.py | 6 |
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): |