From: Simon Marchi Date: Tue, 7 Jan 2020 01:29:52 +0000 (-0500) Subject: tests: make test_sink_self_port_user_data actually test a sink X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=1606ab4cf99d9a9063a1c38bbddb3f5f49db8969 tests: make test_sink_self_port_user_data actually test a sink This test method is meant to test a sink, but currently tests a filter, fix that. Change-Id: Icca321f50a43b709b64f15c885c37c6e7106653d Signed-off-by: Simon Marchi Reviewed-on: https://review.lttng.org/c/babeltrace/+/2735 Tested-by: jenkins --- diff --git a/tests/bindings/python/bt2/test_port.py b/tests/bindings/python/bt2/test_port.py index 53fdf9c7..c404d8fa 100644 --- a/tests/bindings/python/bt2/test_port.py +++ b/tests/bindings/python/bt2/test_port.py @@ -815,11 +815,7 @@ class PortTestCase(unittest.TestCase): ) def test_sink_self_port_user_data(self): - class MyIter(bt2._UserMessageIterator): - def __next__(self): - raise bt2.Stop - - class MySink(bt2._UserFilterComponent, message_iterator_class=MyIter): + class MySink(bt2._UserSinkComponent): def __init__(comp_self, config, params, obj): nonlocal user_datas @@ -828,6 +824,9 @@ class PortTestCase(unittest.TestCase): p = comp_self._add_input_port('port2', set()) user_datas.append(p.user_data) + def _user_consume(self): + pass + user_datas = [] self._create_comp(MySink)