projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bt2: remove unused imports
[babeltrace.git]
/
tests
/
bindings
/
python
/
bt2
/
test_event.py
diff --git
a/tests/bindings/python/bt2/test_event.py
b/tests/bindings/python/bt2/test_event.py
index 74fe7cff1e374d4e044fda296b5748f3dedfdbf7..e4a0f7549e8e813ad3d562d831e2c66f162deb55 100644
(file)
--- a/
tests/bindings/python/bt2/test_event.py
+++ b/
tests/bindings/python/bt2/test_event.py
@@
-16,9
+16,9
@@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
-from collections import OrderedDict
import unittest
import bt2
import unittest
import bt2
+from utils import TestOutputPortMessageIterator
class EventTestCase(unittest.TestCase):
class EventTestCase(unittest.TestCase):
@@
-75,7
+75,7
@@
class EventTestCase(unittest.TestCase):
return msg
class MySrc(bt2._UserSourceComponent, message_iterator_class=MyIter):
return msg
class MySrc(bt2._UserSourceComponent, message_iterator_class=MyIter):
- def __init__(self, params):
+ def __init__(self, params
, obj
):
self._add_output_port('out')
tc = self._create_trace_class()
self._add_output_port('out')
tc = self._create_trace_class()
@@
-153,8
+153,8
@@
class EventTestCase(unittest.TestCase):
test_obj = self
self._graph = bt2.Graph()
self._src_comp = self._graph.add_component(MySrc, 'my_source')
test_obj = self
self._graph = bt2.Graph()
self._src_comp = self._graph.add_component(MySrc, 'my_source')
- self._msg_iter =
self._graph.create_output_port_message_i
terator(
- self._src_comp.output_ports['out']
+ self._msg_iter =
TestOutputPortMessageI
terator(
+ self._
graph, self._
src_comp.output_ports['out']
)
for msg in self._msg_iter:
)
for msg in self._msg_iter:
@@
-229,7
+229,9
@@
class EventTestCase(unittest.TestCase):
def test_no_clock_value(self):
msg = self._create_test_event_message(with_clockclass=False)
def test_no_clock_value(self):
msg = self._create_test_event_message(with_clockclass=False)
- with self.assertRaises(bt2.NonexistentClockSnapshot):
+ with self.assertRaisesRegex(
+ ValueError, 'stream class has no default clock class'
+ ):
msg.default_clock_snapshot
def test_stream(self):
msg.default_clock_snapshot
def test_stream(self):
This page took
0.025119 seconds
and
4
git commands to generate.