X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;ds=sidebyside;f=tests%2Fbindings%2Fpython%2Fbt2%2Ftest_component.py;h=65338c199b5946b5e7da0ce586dea54d281527d4;hb=056deb59eb33e87c06c0067907768ab08aff74a2;hp=e347d98160005521c2af1980ff8ef6845fee9cb4;hpb=16c02b481c4194df6c334031515a7716f216eb26;p=babeltrace.git diff --git a/tests/bindings/python/bt2/test_component.py b/tests/bindings/python/bt2/test_component.py index e347d981..65338c19 100644 --- a/tests/bindings/python/bt2/test_component.py +++ b/tests/bindings/python/bt2/test_component.py @@ -17,7 +17,6 @@ # import unittest -import copy import bt2 @@ -33,7 +32,7 @@ class UserComponentTestCase(unittest.TestCase): def test_name(self): class MySink(bt2._UserSinkComponent): - def __init__(comp_self, params): + def __init__(comp_self, params, obj): self.assertEqual(comp_self.name, 'yaes') def _user_consume(self): @@ -43,7 +42,7 @@ class UserComponentTestCase(unittest.TestCase): def test_logging_level(self): class MySink(bt2._UserSinkComponent): - def __init__(comp_self, params): + def __init__(comp_self, params, obj): self.assertEqual(comp_self.logging_level, bt2.LoggingLevel.INFO) def _user_consume(self): @@ -51,9 +50,19 @@ class UserComponentTestCase(unittest.TestCase): comp = self._create_comp(MySink, 'yaes', bt2.LoggingLevel.INFO) + def test_graph_mip_version(self): + class MySink(bt2._UserSinkComponent): + def __init__(comp_self, params, obj): + self.assertEqual(comp_self._graph_mip_version, 0) + + def _user_consume(self): + pass + + comp = self._create_comp(MySink, 'yaes', bt2.LoggingLevel.INFO) + def test_class(self): class MySink(bt2._UserSinkComponent): - def __init__(comp_self, params): + def __init__(comp_self, params, obj): self.assertEqual(comp_self.cls, MySink) def _user_consume(self): @@ -63,7 +72,7 @@ class UserComponentTestCase(unittest.TestCase): def test_addr(self): class MySink(bt2._UserSinkComponent): - def __init__(comp_self, params): + def __init__(comp_self, params, obj): self.assertIsInstance(comp_self.addr, int) self.assertNotEqual(comp_self.addr, 0)