mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-12-06 07:55:10 +00:00
test: delete slow, timing-based and redundant tests
This commit is contained in:
@@ -31,17 +31,6 @@ def test_restarting_blocks_move_to_their_playlist_start() -> None:
|
||||
assert [starts(t) for t in out] == [["00:00:01.000", "00:06:10.000"], ["00:06:12.956"], ["00:12:27.166"]]
|
||||
|
||||
|
||||
def test_absolute_cue_times_are_not_changed() -> None:
|
||||
# a cue carried over the block boundary starts just before the block, not before its middle
|
||||
texts = [block("00:00:01.000"), block("00:09:58.000", "00:10:05.000")]
|
||||
assert rebase(texts, [0, 600000, 1200000]) == texts
|
||||
|
||||
|
||||
def test_a_late_first_cue_still_restarts() -> None:
|
||||
texts = [block("00:00:01.000"), block("00:00:40.000")]
|
||||
assert starts(rebase(texts, [0, 60000, 120000])[1]) == ["00:01:40.000"]
|
||||
|
||||
|
||||
def test_a_cue_carried_over_a_short_block_is_not_a_restart() -> None:
|
||||
carried = "WEBVTT\n\n00:00:01.000 --> 00:00:08.000\nt\n\n00:00:20.000 --> 00:00:21.000\nt\n"
|
||||
texts = [block("00:00:01.000"), carried]
|
||||
@@ -53,10 +42,6 @@ def test_local_time_marks_the_block_start() -> None:
|
||||
assert starts(rebase(texts, [0, 60000, 120000])[1]) == ["00:01:02.000"]
|
||||
|
||||
|
||||
def test_shift_clamps_at_zero() -> None:
|
||||
assert starts(shift_webvtt(block("00:00:01.000"), -5000)) == ["00:00:00.000"]
|
||||
|
||||
|
||||
def test_discontinuity_files_are_rewritten(tmp_path: Path) -> None:
|
||||
segments = [SimpleNamespace(discontinuity=d, duration=t) for d, t in ((True, 5), (False, 5), (True, 5))]
|
||||
files = [tmp_path / "0.vtt", tmp_path / "1.vtt"]
|
||||
|
||||
Reference in New Issue
Block a user