bt2: Add remaining trace-ir `*Const` classes and adapt tests
[babeltrace.git] / tests / bindings / python / bt2 / test_connection.py
index fc5c546e5ae6315d709ebe6a48de861e20f58981..127fd2e8fd36c7e08239e88f107ea006ce9f9081 100644 (file)
@@ -27,23 +27,20 @@ class ConnectionTestCase(unittest.TestCase):
                 raise bt2.Stop
 
         class MySource(bt2._UserSourceComponent, message_iterator_class=MyIter):
-            def __init__(self, params):
+            def __init__(self, params, obj):
                 self._add_output_port('out')
 
         class MySink(bt2._UserSinkComponent):
-            def __init__(self, params):
+            def __init__(self, params, obj):
                 self._add_input_port('in')
 
-            def _consume(self):
+            def _user_consume(self):
                 raise bt2.Stop
 
-            def _graph_is_configured(self):
-                pass
-
         graph = bt2.Graph()
         src = graph.add_component(MySource, 'src')
         sink = graph.add_component(MySink, 'sink')
-        conn = graph.connect_ports(src.output_ports['out'], sink.input_ports['in'])
+        graph.connect_ports(src.output_ports['out'], sink.input_ports['in'])
 
     def test_downstream_port(self):
         class MyIter(bt2._UserMessageIterator):
@@ -51,19 +48,16 @@ class ConnectionTestCase(unittest.TestCase):
                 raise bt2.Stop
 
         class MySource(bt2._UserSourceComponent, message_iterator_class=MyIter):
-            def __init__(self, params):
+            def __init__(self, params, obj):
                 self._add_output_port('out')
 
         class MySink(bt2._UserSinkComponent):
-            def __init__(self, params):
+            def __init__(self, params, obj):
                 self._add_input_port('in')
 
-            def _consume(self):
+            def _user_consume(self):
                 raise bt2.Stop
 
-            def _graph_is_configured(self):
-                pass
-
         graph = bt2.Graph()
         src = graph.add_component(MySource, 'src')
         sink = graph.add_component(MySink, 'sink')
@@ -76,19 +70,16 @@ class ConnectionTestCase(unittest.TestCase):
                 raise bt2.Stop
 
         class MySource(bt2._UserSourceComponent, message_iterator_class=MyIter):
-            def __init__(self, params):
+            def __init__(self, params, obj):
                 self._add_output_port('out')
 
         class MySink(bt2._UserSinkComponent):
-            def __init__(self, params):
+            def __init__(self, params, obj):
                 self._add_input_port('in')
 
-            def _consume(self):
+            def _user_consume(self):
                 raise bt2.Stop
 
-            def _graph_is_configured(self):
-                pass
-
         graph = bt2.Graph()
         src = graph.add_component(MySource, 'src')
         sink = graph.add_component(MySink, 'sink')
This page took 0.026946 seconds and 4 git commands to generate.