lib: prepare the ground for stateful query operations
[babeltrace.git] / tests / bindings / python / bt2 / test_error.py
index ca750aea6cd4acfe80987d836eab1e4c07d1af23..b09dded2b36e267c2fb8ff7bf9d93804c5e50930 100644 (file)
@@ -70,7 +70,7 @@ class SinkWithFailingQuery(bt2._UserSinkComponent):
         pass
 
     @staticmethod
-    def _user_query(executor, obj, params, log_level):
+    def _user_query(priv_executor, obj, params):
         raise ValueError('Query is failing')
 
 
@@ -177,10 +177,10 @@ class ErrorTestCase(unittest.TestCase):
         self.assertIsNone(cause.plugin_name)
 
     def test_component_class_error_cause(self):
-        q = bt2.QueryExecutor()
+        q = bt2.QueryExecutor(SinkWithFailingQuery, 'hello')
 
         with self.assertRaises(bt2._Error) as ctx:
-            q.query(SinkWithFailingQuery, 'hello')
+            q.query()
 
         cause = ctx.exception[0]
         self.assertIs(type(cause), bt2._ComponentClassErrorCause)
This page took 0.024074 seconds and 4 git commands to generate.