lib: msg. iter. inactivity message has a simple CS, not a default CS
[babeltrace.git] / tests / bindings / python / bt2 / test_message.py
index b2ad1a426d791ef6b677681dfecd2478ed6a5a62..7c26a935536e5e9b2fe3a9bec9c6fa922328c66d 100644 (file)
@@ -34,7 +34,7 @@ from bt2 import trace_class as bt2_trace_class
 class AllMessagesTestCase(unittest.TestCase):
     def setUp(self):
         class MyIter(bt2._UserMessageIterator):
-            def __init__(self, self_port_output):
+            def __init__(self, config, self_port_output):
                 self._at = 0
                 self._with_stream_msgs_clock_snapshots = self_port_output.user_data.get(
                     'with_stream_msgs_clock_snapshots', False
@@ -119,7 +119,7 @@ class AllMessagesTestCase(unittest.TestCase):
                 return msg
 
         class MySrc(bt2._UserSourceComponent, message_iterator_class=MyIter):
-            def __init__(self, params, obj):
+            def __init__(self, config, params, obj):
                 self._add_output_port('out', params)
 
                 with_cc = bool(params['with_cc'])
@@ -215,10 +215,9 @@ class AllMessagesTestCase(unittest.TestCase):
             elif i == 3:
                 self.assertIs(type(msg), bt2._MessageIteratorInactivityMessageConst)
                 self.assertIs(
-                    type(msg.default_clock_snapshot),
-                    bt2_clock_snapshot._ClockSnapshotConst,
+                    type(msg.clock_snapshot), bt2_clock_snapshot._ClockSnapshotConst
                 )
-                self.assertEqual(msg.default_clock_snapshot.value, i)
+                self.assertEqual(msg.clock_snapshot.value, i)
             elif i == 4:
                 self.assertIs(type(msg), bt2._DiscardedEventsMessageConst)
                 self.assertIs(type(msg.stream), bt2_stream._StreamConst)
@@ -405,3 +404,7 @@ class AllMessagesTestCase(unittest.TestCase):
     def test_event_msg(self):
         msg = utils.get_event_message()
         self.assertIs(type(msg.event), bt2_event._Event)
+
+
+if __name__ == '__main__':
+    unittest.main()
This page took 0.027576 seconds and 4 git commands to generate.