X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=tests%2Fbindings%2Fpython%2Fbt2%2Ftest_trace.py;fp=tests%2Fbindings%2Fpython%2Fbt2%2Ftest_trace.py;h=3b26826de6acf0fed0188b1665f60331b22f72d8;hp=70e70e7548003bb52bc3e7f3cf7b93dd4f7c3d2d;hb=eead7a7694f1f7e4bfb7b9e62832da077c5a0f51;hpb=0824d69ac4940b8d1277f6eb5dad8860c7f55088 diff --git a/tests/bindings/python/bt2/test_trace.py b/tests/bindings/python/bt2/test_trace.py index 70e70e75..3b26826d 100644 --- a/tests/bindings/python/bt2/test_trace.py +++ b/tests/bindings/python/bt2/test_trace.py @@ -149,11 +149,15 @@ class TraceTestCase(unittest.TestCase): num_trace_class_destroyed_calls += 1 def on_trace_destruction(trace): + nonlocal type_of_passed_trace + type_of_passed_trace = type(trace) + nonlocal num_trace_destroyed_calls num_trace_destroyed_calls += 1 num_trace_class_destroyed_calls = 0 num_trace_destroyed_calls = 0 + type_of_passed_trace = None trace_class = get_default_trace_class() stream_class = trace_class.create_stream_class() @@ -180,6 +184,7 @@ class TraceTestCase(unittest.TestCase): self.assertEqual(num_trace_class_destroyed_calls, 0) self.assertEqual(num_trace_destroyed_calls, 1) + self.assertIs(type_of_passed_trace, bt2_trace._TraceConst) del trace_class