lib: strictly type function return status enumerations
[babeltrace.git] / tests / bindings / python / bt2 / test_graph.py
index 1df1d32f9b76c82b422770245e76a83ad3f0ad48..3ec32e628422d7591e5cad6bc2c31d8d36f4551c 100644 (file)
@@ -173,39 +173,12 @@ class GraphTestCase(unittest.TestCase):
             conn = self._graph.connect_ports(sink.input_ports['in'],
                                              src.output_ports['out'])
 
-    def test_connect_ports_refused(self):
-        class MyIter(bt2._UserMessageIterator):
-            def __next__(self):
-                raise bt2.Stop
-
-        class MySource(bt2._UserSourceComponent,
-                       message_iterator_class=MyIter):
-            def __init__(self, params):
-                self._add_output_port('out')
-
-        class MySink(bt2._UserSinkComponent):
-            def __init__(self, params):
-                self._add_input_port('in')
-
-            def _consume(self):
-                raise bt2.Stop
-
-            def _accept_port_connection(self, port, other_port):
-                return False
-
-        src = self._graph.add_component(MySource, 'src')
-        sink = self._graph.add_component(MySink, 'sink')
-
-        with self.assertRaises(bt2.PortConnectionRefused):
-            conn = self._graph.connect_ports(src.output_ports['out'],
-                                             sink.input_ports['in'])
-
     def test_cancel(self):
         self.assertFalse(self._graph.is_canceled)
         self._graph.cancel()
         self.assertTrue(self._graph.is_canceled)
 
-    # Test that Graph.run() raises bt2.GraphCanceled if the graph gets canceled
+    # Test that Graph.run() raises bt2.Canceled if the graph gets canceled
     # during execution.
     def test_cancel_while_running(self):
         class MyIter(_MyIter):
@@ -235,7 +208,7 @@ class GraphTestCase(unittest.TestCase):
         up = graph.add_component(MySource, 'down')
         down = graph.add_component(MySink, 'up')
         graph.connect_ports(up.output_ports['out'], down.input_ports['in'])
-        with self.assertRaises(bt2.GraphCanceled):
+        with self.assertRaises(bt2.Canceled):
             graph.run()
 
     def test_run(self):
This page took 0.026097 seconds and 4 git commands to generate.