bt2: pass custom Python object to Python component's __init__()
[babeltrace.git] / tests / bindings / python / bt2 / test_event.py
index 74fe7cff1e374d4e044fda296b5748f3dedfdbf7..ea65b5909dfcbd8095628486ff6b5075adaa19c9 100644 (file)
@@ -75,7 +75,7 @@ class EventTestCase(unittest.TestCase):
                 return msg
 
         class MySrc(bt2._UserSourceComponent, message_iterator_class=MyIter):
-            def __init__(self, params):
+            def __init__(self, params, obj):
                 self._add_output_port('out')
                 tc = self._create_trace_class()
 
@@ -229,7 +229,9 @@ class EventTestCase(unittest.TestCase):
 
     def test_no_clock_value(self):
         msg = self._create_test_event_message(with_clockclass=False)
-        with self.assertRaises(bt2.NonexistentClockSnapshot):
+        with self.assertRaisesRegex(
+            ValueError, 'stream class has no default clock class'
+        ):
             msg.default_clock_snapshot
 
     def test_stream(self):
This page took 0.024355 seconds and 4 git commands to generate.