babeltrace2-plugin-ctf(7): "theirs" -> "its" (single CTF trace)
[babeltrace.git] / tests / bindings / python / bt2 / test_trace.py
index 8b5537f2c198f163f08476e5b24aafdc35fd4447..70e70e7548003bb52bc3e7f3cf7b93dd4f7c3d2d 100644 (file)
@@ -168,9 +168,6 @@ class TraceTestCase(unittest.TestCase):
 
         trace.remove_destruction_listener(td_handle2)
 
-        del td_handle1
-        del td_handle2
-
         self.assertEqual(num_trace_class_destroyed_calls, 0)
         self.assertEqual(num_trace_destroyed_calls, 0)
 
@@ -235,6 +232,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.02356 seconds and 4 git commands to generate.