bt2: pass custom Python object to Python component's __init__()
[babeltrace.git] / tests / bindings / python / bt2 / test_clock_class.py
index c8828ebfc5d1105be52c2dfe3ff960d3069a4144..48ae9602fb7300858253605c92d65933254dcfc6 100644 (file)
@@ -181,7 +181,7 @@ class ClockClassTestCase(unittest.TestCase):
             return comp_self._create_clock_class(frequency=1000)
 
         cc = run_in_component_init(f)
-        with self.assertRaises(bt2.OverflowError):
+        with self.assertRaises(bt2._OverflowError):
             cc.cycles_to_ns_from_origin(2 ** 63)
 
     def test_create_uuid(self):
@@ -239,7 +239,7 @@ class ClockSnapshotTestCase(unittest.TestCase):
                 return notif
 
         class MySrc(bt2._UserSourceComponent, message_iterator_class=MyIter):
-            def __init__(self, params):
+            def __init__(self, params, obj):
                 self._add_output_port('out')
 
         self._graph = bt2.Graph()
@@ -278,7 +278,7 @@ class ClockSnapshotTestCase(unittest.TestCase):
         )
 
     def test_ns_from_origin_overflow(self):
-        with self.assertRaises(bt2.OverflowError):
+        with self.assertRaises(bt2._OverflowError):
             self._msg_clock_overflow.default_clock_snapshot.ns_from_origin
 
     def test_eq_int(self):
This page took 0.023904 seconds and 4 git commands to generate.