]
)
- def test_static_mid(self):
+ def test_no_sync(self):
self._run_case(
[
[
Segment('seg104', 12),
Segment('seg105', 12),
],
+ [
+ M3u(),
+ Version(3),
+ TargDur(15),
+ MediaSeq(102),
+ Segment('seg102', 15),
+ Segment('seg103', 12),
+ Segment('seg104', 12),
+ Segment('seg105', 12),
+ Segment('seg106', 12),
+ ],
],
[
[
Segment('seg103', 12),
Segment('seg104', 12),
Segment('seg105', 12),
+ Segment('seg106', 12),
Endlist(),
],
]
)
- def test_media_seq(self):
+ def test_zero_media_seq(self):
self._run_case(
[
[
]
)
+ def test_bad_targ_dur(self):
+ with self.assertRaises(ValueError):
+ self._run_case(
+ [
+ [
+ M3u(),
+ Version(3),
+ TargDur(12),
+ Segment('seg-0', 10),
+ ],
+ [
+ M3u(),
+ Version(3),
+ TargDur(15),
+ MediaSeq(1),
+ Segment('seg-1', 10),
+ ],
+ ],
+ []
+ )
+
if __name__ == '__main__':
unittest.main()