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):
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):