- def test_packets_have_default_beginning_clock_snapshot(self):
- sc = self._tc.create_stream_class(default_clock_class=self._cc, packets_have_default_beginning_clock_snapshot=True)
- self.assertTrue(sc.packets_have_default_beginning_clock_snapshot)
-
- def test_packets_have_default_beginning_clock_snapshot_raises(self):
+ def test_supports_packets_without_cs(self):
+ sc = self._tc.create_stream_class(
+ default_clock_class=self._cc, supports_packets=True
+ )
+ self.assertTrue(sc.supports_packets)
+ self.assertFalse(sc.packets_have_beginning_default_clock_snapshot)
+ self.assertFalse(sc.packets_have_end_default_clock_snapshot)
+
+ def test_supports_packets_with_begin_cs(self):
+ sc = self._tc.create_stream_class(
+ default_clock_class=self._cc,
+ supports_packets=True,
+ packets_have_beginning_default_clock_snapshot=True,
+ )
+ self.assertTrue(sc.supports_packets)
+ self.assertTrue(sc.packets_have_beginning_default_clock_snapshot)
+ self.assertFalse(sc.packets_have_end_default_clock_snapshot)
+
+ def test_supports_packets_with_end_cs(self):
+ sc = self._tc.create_stream_class(
+ default_clock_class=self._cc,
+ supports_packets=True,
+ packets_have_end_default_clock_snapshot=True,
+ )
+ self.assertTrue(sc.supports_packets)
+ self.assertFalse(sc.packets_have_beginning_default_clock_snapshot)
+ self.assertTrue(sc.packets_have_end_default_clock_snapshot)
+
+ def test_supports_packets_raises_type_error(self):