diff options
author | Mark Shannon <mark@hotpy.org> | 2023-07-28 10:30:16 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-28 10:30:16 (GMT) |
commit | 3f167de440f65eb03f795e33b98cf3e84627e213 (patch) | |
tree | d80aabd7204b502a3d6a4d557cebfb5dc7b81268 /Lib/test/test_monitoring.py | |
parent | 0902afbae29ef88bf9d212a7e11f9f17b6cbdeb5 (diff) | |
download | cpython-3f167de440f65eb03f795e33b98cf3e84627e213.zip cpython-3f167de440f65eb03f795e33b98cf3e84627e213.tar.gz cpython-3f167de440f65eb03f795e33b98cf3e84627e213.tar.bz2 |
[3.12] GH-106898: Add the exception as an argument to the `PY_UNWIND` event callback function. (GH-107347) (GH-107382)
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 9685a43..9d0ad6f 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): |