X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=tests%2Fbindings%2Fpython%2Fbt2%2Ftest_clock_class.py;h=9bc6bae7497593be6b15e7da9ccd941268b19f30;hb=57081273d1191fc79edc101af619fab96b72460d;hp=c8828ebfc5d1105be52c2dfe3ff960d3069a4144;hpb=cfbd7cf3bde05e8a6606478889dcd663604ef7b5;p=babeltrace.git diff --git a/tests/bindings/python/bt2/test_clock_class.py b/tests/bindings/python/bt2/test_clock_class.py index c8828ebf..9bc6bae7 100644 --- a/tests/bindings/python/bt2/test_clock_class.py +++ b/tests/bindings/python/bt2/test_clock_class.py @@ -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):