bt2: check for _graph_is_configured method in user sink classes
[babeltrace.git] / tests / bindings / python / bt2 / test_port.py
index 4566c3a60d0a52e4dbd1b2110f5c25a21c00480c..c94bb920ac197393768b9d0845e8fc7d0451944a 100644 (file)
@@ -1,3 +1,21 @@
+#
+# Copyright (C) 2019 EfficiOS Inc.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; only version 2
+# of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#
+
 import unittest
 import bt2
 
@@ -63,6 +81,9 @@ class PortTestCase(unittest.TestCase):
             def _consume(self):
                 pass
 
+            def _graph_is_configured(self):
+                pass
+
         comp = self._create_comp(MySink)
         self.assertEqual(len(comp.input_ports), 1)
 
@@ -130,6 +151,9 @@ class PortTestCase(unittest.TestCase):
             def _consume(self):
                 pass
 
+            def _graph_is_configured(self):
+                pass
+
         self._create_comp(MySink)
 
     def test_user_src_output_ports_getitem_invalid_key(self):
@@ -196,6 +220,9 @@ class PortTestCase(unittest.TestCase):
             def _consume(self):
                 pass
 
+            def _graph_is_configured(self):
+                pass
+
         self._create_comp(MySink)
 
     def test_user_src_output_ports_len(self):
@@ -254,6 +281,9 @@ class PortTestCase(unittest.TestCase):
             def _consume(self):
                 pass
 
+            def _graph_is_configured(self):
+                pass
+
         self._create_comp(MySink)
 
     def test_user_src_output_ports_iter(self):
@@ -352,6 +382,9 @@ class PortTestCase(unittest.TestCase):
             def _consume(self):
                 pass
 
+            def _graph_is_configured(self):
+                pass
+
         self._create_comp(MySink)
 
     def test_gen_src_output_ports_getitem(self):
@@ -444,6 +477,9 @@ class PortTestCase(unittest.TestCase):
             def _consume(self):
                 pass
 
+            def _graph_is_configured(self):
+                pass
+
         comp = self._create_comp(MySink)
         self.assertEqual(port3.addr, comp.input_ports['insert'].addr)
         self.assertEqual(port2.addr, comp.input_ports['print'].addr)
@@ -516,6 +552,9 @@ class PortTestCase(unittest.TestCase):
             def _consume(self):
                 pass
 
+            def _graph_is_configured(self):
+                pass
+
         comp = self._create_comp(MySink)
 
         with self.assertRaises(KeyError):
@@ -576,6 +615,9 @@ class PortTestCase(unittest.TestCase):
             def _consume(self):
                 pass
 
+            def _graph_is_configured(self):
+                pass
+
         comp = self._create_comp(MySink)
         self.assertEqual(len(comp.input_ports), 3)
 
@@ -693,6 +735,9 @@ class PortTestCase(unittest.TestCase):
             def _consume(self):
                 pass
 
+            def _graph_is_configured(self):
+                pass
+
         comp = self._create_comp(MySink)
         ports = []
 
@@ -717,6 +762,9 @@ class PortTestCase(unittest.TestCase):
             def _consume(self):
                 pass
 
+            def _graph_is_configured(self):
+                pass
+
         comp = self._create_comp(MySink)
         self.assertEqual(comp.input_ports['clear'].name, 'clear')
 
@@ -728,6 +776,9 @@ class PortTestCase(unittest.TestCase):
             def _consume(self):
                 pass
 
+            def _graph_is_configured(self):
+                pass
+
         comp = self._create_comp(MySink)
         self.assertIsNone(comp.input_ports['clear'].connection)
 
@@ -739,6 +790,9 @@ class PortTestCase(unittest.TestCase):
             def _consume(self):
                 pass
 
+            def _graph_is_configured(self):
+                pass
+
         comp = self._create_comp(MySink)
         self.assertFalse(comp.input_ports['clear'].is_connected)
 
@@ -751,6 +805,9 @@ class PortTestCase(unittest.TestCase):
             def _consume(self):
                 pass
 
+            def _graph_is_configured(self):
+                pass
+
         self._create_comp(MySink)
 
     def test_self_connection_none(self):
@@ -762,6 +819,9 @@ class PortTestCase(unittest.TestCase):
             def _consume(self):
                 pass
 
+            def _graph_is_configured(self):
+                pass
+
         self._create_comp(MySink)
 
     def test_self_is_connected_false(self):
@@ -773,6 +833,9 @@ class PortTestCase(unittest.TestCase):
             def _consume(self):
                 pass
 
+            def _graph_is_configured(self):
+                pass
+
         self._create_comp(MySink)
 
     def test_source_self_port_user_data(self):
This page took 0.024685 seconds and 4 git commands to generate.