Fix: bt2: clear Python error indicator in trace and trace class destruction listeners
[babeltrace.git] / tests / bindings / python / bt2 / test_trace_class.py
index 4c2941da8f5aa1eddc038c5d1b1ce8fd787dcd74..3345b18a913edf0b0174ea99bea860e8d09ee4eb 100644 (file)
@@ -236,6 +236,15 @@ class TraceClassTestCase(unittest.TestCase):
         ):
             trace_class.remove_destruction_listener(handle)
 
+    def test_raise_in_destruction_listener(self):
+        def on_trace_class_destruction(trace_class):
+            raise ValueError('it hurts')
+
+        trace_class = get_default_trace_class()
+        trace_class.add_destruction_listener(on_trace_class_destruction)
+
+        del trace_class
+
 
 if __name__ == '__main__':
     unittest.main()
This page took 0.02395 seconds and 4 git commands to generate.