X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=tests%2Fbindings%2Fpython%2Fbt2%2Ftest_trace.py;fp=tests%2Fbindings%2Fpython%2Fbt2%2Ftest_trace.py;h=4a1b1b61669d64e829465317b9276678e4828bb9;hb=64961f8b6306c567fd2683d19a1bdee1331a8d5b;hp=8b5537f2c198f163f08476e5b24aafdc35fd4447;hpb=6dbc193813652398f803c5c3585710222f5335f6;p=babeltrace.git diff --git a/tests/bindings/python/bt2/test_trace.py b/tests/bindings/python/bt2/test_trace.py index 8b5537f2..4a1b1b61 100644 --- a/tests/bindings/python/bt2/test_trace.py +++ b/tests/bindings/python/bt2/test_trace.py @@ -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()