bt2: remove unused imports
[babeltrace.git] / tests / bindings / python / bt2 / test_clock_class.py
index c8828ebfc5d1105be52c2dfe3ff960d3069a4144..9bc6bae7497593be6b15e7da9ccd941268b19f30 100644 (file)
@@ -18,9 +18,8 @@
 
 import unittest
 import uuid
-import copy
 import bt2
-from utils import run_in_component_init
+from utils import run_in_component_init, TestOutputPortMessageIterator
 
 
 class ClockClassOffsetTestCase(unittest.TestCase):
@@ -181,7 +180,7 @@ class ClockClassTestCase(unittest.TestCase):
             return comp_self._create_clock_class(frequency=1000)
 
         cc = run_in_component_init(f)
-        with self.assertRaises(bt2.OverflowError):
+        with self.assertRaises(bt2._OverflowError):
             cc.cycles_to_ns_from_origin(2 ** 63)
 
     def test_create_uuid(self):
@@ -239,13 +238,13 @@ class ClockSnapshotTestCase(unittest.TestCase):
                 return notif
 
         class MySrc(bt2._UserSourceComponent, message_iterator_class=MyIter):
-            def __init__(self, params):
+            def __init__(self, params, obj):
                 self._add_output_port('out')
 
         self._graph = bt2.Graph()
         self._src_comp = self._graph.add_component(MySrc, 'my_source')
-        self._msg_iter = self._graph.create_output_port_message_iterator(
-            self._src_comp.output_ports['out']
+        self._msg_iter = TestOutputPortMessageIterator(
+            self._graph, self._src_comp.output_ports['out']
         )
 
         for i, msg in enumerate(self._msg_iter):
@@ -278,7 +277,7 @@ class ClockSnapshotTestCase(unittest.TestCase):
         )
 
     def test_ns_from_origin_overflow(self):
-        with self.assertRaises(bt2.OverflowError):
+        with self.assertRaises(bt2._OverflowError):
             self._msg_clock_overflow.default_clock_snapshot.ns_from_origin
 
     def test_eq_int(self):
This page took 0.036255 seconds and 4 git commands to generate.