lib: pass config objects to component init methods
[babeltrace.git] / tests / data / auto-source-discovery / grouping / bt_plugin_test.py
index 2495b502099714a72eae152f367713d85cbb2b0a..dd4d5a4b73288a629e4276ecf36797976f685661 100644 (file)
@@ -52,7 +52,7 @@ class TestSourceExt(Base, bt2._UserSourceComponent, message_iterator_class=TestI
     files are not grouped.
     """
 
-    def __init__(self, params, obj):
+    def __init__(self, config, params, obj):
         super().__init__(params)
 
     @staticmethod
@@ -66,18 +66,13 @@ class TestSourceExt(Base, bt2._UserSourceComponent, message_iterator_class=TestI
                 elif name.startswith('bbb'):
                     return {'weight': 0.5, 'group': 'bbb'}
                 elif name.startswith('ccc'):
-                    # Try two different ways of returning "no group", and two
-                    # different ways of returning 1 (an int and a float).
+                    # Try two different ways of returning 1 (an int and a float).
                     if name[3] == '1':
-                        return {'weight': 1, 'group': None}
-                    elif name[3] == '2':
-                        return {'weight': 1.0, 'group': None}
-                    elif name[3] == '3':
                         return 1
                     else:
                         return 1.0
-            else:
-                return 0
+
+            return 0
         else:
             raise bt2.UnknownObject
 
@@ -90,7 +85,7 @@ class TestSourceSomeDir(
     directory "some-dir" won't be found by TestSourceExt, because we won't
     recurse in "some-dir"."""
 
-    def __init__(self, params, obj):
+    def __init__(self, config, params, obj):
         super().__init__(params)
 
     @staticmethod
@@ -109,7 +104,7 @@ class TestSourceSomeDir(
 class TestSourceABCDE(Base, bt2._UserSourceComponent, message_iterator_class=TestIter):
     """A source that recognizes the arbitrary string input "ABCDE"."""
 
-    def __init__(self, params, obj):
+    def __init__(self, config, params, obj):
         super().__init__(params)
 
     @staticmethod
This page took 0.027864 seconds and 4 git commands to generate.