bt2: rename `_Generic*ComponentClass` -> `_*ComponentClass`
[babeltrace.git] / tests / bindings / python / bt2 / test_component_class.py
index 857d15270dd3312dc5ee56960daa75d31499a57c..58e5a863d76bbf8b5d8f4c221dcabfb53b496c71 100644 (file)
@@ -23,7 +23,7 @@ import bt2
 
 class UserComponentClassTestCase(unittest.TestCase):
     def _test_no_init(self, cls):
-        with self.assertRaises(bt2.Error):
+        with self.assertRaises(RuntimeError):
             cls()
 
     def test_no_init_source(self):
@@ -214,7 +214,7 @@ class UserComponentClassTestCase(unittest.TestCase):
             def _graph_is_configured(self):
                 pass
 
-        with self.assertRaises(bt2.Error):
+        with self.assertRaises(bt2._Error):
             bt2.QueryExecutor().query(MySink, 'obj', 23)
 
     def test_query_raises(self):
@@ -229,7 +229,7 @@ class UserComponentClassTestCase(unittest.TestCase):
             def _query(cls, query_exec, obj, params, log_level):
                 raise ValueError
 
-        with self.assertRaises(bt2.Error):
+        with self.assertRaises(bt2._Error):
             bt2.QueryExecutor().query(MySink, 'obj', 23)
 
     def test_query_wrong_return_type(self):
@@ -244,7 +244,7 @@ class UserComponentClassTestCase(unittest.TestCase):
             def _query(cls, query_exec, obj, params, log_level):
                 return ...
 
-        with self.assertRaises(bt2.Error):
+        with self.assertRaises(bt2._Error):
             bt2.QueryExecutor().query(MySink, 'obj', 23)
 
     def test_query_params_none(self):
@@ -359,7 +359,7 @@ class UserComponentClassTestCase(unittest.TestCase):
         self.assertEqual(MySink, MySink)
 
 
-class GenericComponentClassTestCase(unittest.TestCase):
+class ComponentClassTestCase(unittest.TestCase):
     def setUp(self):
         class MySink(bt2._UserSinkComponent):
             '''
@@ -382,9 +382,7 @@ class GenericComponentClassTestCase(unittest.TestCase):
         graph = bt2.Graph()
         comp = graph.add_component(MySink, 'salut')
         self._comp_cls = comp.cls
-        self.assertTrue(
-            issubclass(type(self._comp_cls), bt2.component._GenericComponentClass)
-        )
+        self.assertTrue(issubclass(type(self._comp_cls), bt2.component._ComponentClass))
 
     def tearDown(self):
         del self._py_comp_cls
This page took 0.040986 seconds and 4 git commands to generate.