Fix: bt2: clear Python error indicator in trace and trace class destruction listeners
[babeltrace.git] / tests / bindings / python / bt2 / test_trace.py
index 8b5537f2c198f163f08476e5b24aafdc35fd4447..4a1b1b61669d64e829465317b9276678e4828bb9 100644 (file)
@@ -235,6 +235,16 @@ class TraceTestCase(unittest.TestCase):
         ):
             trace.remove_destruction_listener(handle)
 
+    def test_raise_in_destruction_listener(self):
+        def on_trace_destruction(trace):
+            raise ValueError('it hurts')
+
+        trace_class = get_default_trace_class()
+        trace = trace_class()
+        trace.add_destruction_listener(on_trace_destruction)
+
+        del trace
+
 
 if __name__ == '__main__':
     unittest.main()
This page took 0.022754 seconds and 4 git commands to generate.