bt2: Adapt test_port.py and make it pass
[babeltrace.git] / tests / bindings / python / bt2 / test_component.py
index 77d346b62c7cdea1024b84623029470d9c4cd6fb..30523ecd3bd71d17178ecc93734a40ef2987e587 100644 (file)
@@ -4,7 +4,6 @@ import copy
 import bt2
 
 
-@unittest.skip("this is broken")
 class UserComponentTestCase(unittest.TestCase):
     @staticmethod
     def _create_comp(comp_cls, name=None):
@@ -25,19 +24,6 @@ class UserComponentTestCase(unittest.TestCase):
 
         comp = self._create_comp(MySink, 'yaes')
 
-    def test_graph(self):
-        class MySink(bt2._UserSinkComponent):
-            def __init__(comp_self, params):
-                nonlocal graph
-                self.assertEqual(comp_self.graph, graph)
-
-            def _consume(self):
-                pass
-
-        graph = bt2.Graph()
-        comp = graph.add_component(MySink, 'lel')
-        del graph
-
     def test_class(self):
         class MySink(bt2._UserSinkComponent):
             def __init__(comp_self, params):
@@ -72,12 +58,12 @@ class UserComponentTestCase(unittest.TestCase):
 
         graph = bt2.Graph()
         comp = graph.add_component(MySink, 'lel')
+
         del graph
         del comp
         self.assertTrue(finalized)
 
 
-@unittest.skip("this is broken")
 class GenericComponentTestCase(unittest.TestCase):
     @staticmethod
     def _create_comp(comp_cls, name=None):
@@ -96,15 +82,6 @@ class GenericComponentTestCase(unittest.TestCase):
         comp = self._create_comp(MySink, 'yaes')
         self.assertEqual(comp.name, 'yaes')
 
-    def test_graph(self):
-        class MySink(bt2._UserSinkComponent):
-            def _consume(self):
-                pass
-
-        graph = bt2.Graph()
-        comp = graph.add_component(MySink, 'lel')
-        self.assertEqual(comp.graph, graph)
-
     def test_class(self):
         class MySink(bt2._UserSinkComponent):
             def _consume(self):
This page took 0.026851 seconds and 4 git commands to generate.