+#
+# 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.
+#
+
from collections import OrderedDict
import unittest
import bt2
with_ep=False):
class MyIter(bt2._UserMessageIterator):
- def __init__(self):
+ def __init__(self, self_output_port):
self._at = 0
def __next__(self):
def test_attr_event_class(self):
msg = self._create_test_event_message()
- self.assertEqual(msg.event.event_class.addr, self.event_class.addr)
+ self.assertEqual(msg.event.cls.addr, self.event_class.addr)
def test_attr_name(self):
msg = self._create_test_event_message()
def test_no_clock_value(self):
msg = self._create_test_event_message(with_clockclass=False)
- self.assertIsNone(msg.default_clock_snapshot)
+ with self.assertRaises(bt2.NonexistentClockSnapshot):
+ msg.default_clock_snapshot
def test_stream(self):
msg = self._create_test_event_message()