From 1606ab4cf99d9a9063a1c38bbddb3f5f49db8969 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Mon, 6 Jan 2020 20:29:52 -0500 Subject: [PATCH] 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 --- tests/bindings/python/bt2/test_port.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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) -- 2.34.1