X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=tests%2Fbindings%2Fpython%2Fbt2%2Ftest_message.py;h=3cadfe1f77001ee8dd0e021e56d5e7fa83f8f550;hp=6000a0fa972404e3b0cd55c0f38a8ddfef680bf1;hb=0235b0db7de5bcacdb3650c92461f2ce5eb2143d;hpb=d14ddbbab48ce07804d4252228fceee692d5dea4 diff --git a/tests/bindings/python/bt2/test_message.py b/tests/bindings/python/bt2/test_message.py index 6000a0fa..3cadfe1f 100644 --- a/tests/bindings/python/bt2/test_message.py +++ b/tests/bindings/python/bt2/test_message.py @@ -1,20 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2019 EfficiOS Inc. # -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; only version 2 -# of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# import unittest import bt2 @@ -34,7 +21,7 @@ from bt2 import trace_class as bt2_trace_class class AllMessagesTestCase(unittest.TestCase): def setUp(self): class MyIter(bt2._UserMessageIterator): - def __init__(self, self_port_output): + def __init__(self, config, self_port_output): self._at = 0 self._with_stream_msgs_clock_snapshots = self_port_output.user_data.get( 'with_stream_msgs_clock_snapshots', False @@ -119,7 +106,7 @@ class AllMessagesTestCase(unittest.TestCase): return msg class MySrc(bt2._UserSourceComponent, message_iterator_class=MyIter): - def __init__(self, params, obj): + def __init__(self, config, params, obj): self._add_output_port('out', params) with_cc = bool(params['with_cc']) @@ -215,10 +202,9 @@ class AllMessagesTestCase(unittest.TestCase): elif i == 3: self.assertIs(type(msg), bt2._MessageIteratorInactivityMessageConst) self.assertIs( - type(msg.default_clock_snapshot), - bt2_clock_snapshot._ClockSnapshotConst, + type(msg.clock_snapshot), bt2_clock_snapshot._ClockSnapshotConst ) - self.assertEqual(msg.default_clock_snapshot.value, i) + self.assertEqual(msg.clock_snapshot.value, i) elif i == 4: self.assertIs(type(msg), bt2._DiscardedEventsMessageConst) self.assertIs(type(msg.stream), bt2_stream._StreamConst)