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:
@@ -2,13 +2,11 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from tests.core.test_rolling_merge_hls_ism import base, ism_track, make_ctx
|
||||
from tests.core.test_rolling_merge_hls_ism import base, make_ctx
|
||||
from tests.core.test_rolling_merge_hls_ism import no_cancel as no_cancel # noqa: F401
|
||||
from tests.core.test_rolling_merge_hls_ism import server as server # noqa: F401
|
||||
from unshackle.core.config import config
|
||||
from unshackle.core.manifests import ISM
|
||||
from unshackle.core.manifests import ism as ism_module
|
||||
from unshackle.core.tracks.segment_store import SegmentStore
|
||||
|
||||
CUES = [b"1\n00:00:00,000 --> 00:00:01,000\n‎one\n\n", b"2\n00:00:02,000 --> 00:00:03,000\n‏two\n\n"]
|
||||
|
||||
@@ -41,14 +39,3 @@ def test_a_text_subtitle_merges_behind_its_init_with_the_entities_as_characters(
|
||||
assert ctx.save_path.read_bytes() == b"INIT" + b"".join(CUES).replace(b"‎", "\u200e".encode()).replace(
|
||||
b"‏", "\u200f".encode()
|
||||
)
|
||||
|
||||
|
||||
def test_the_rolling_merge_ends_the_download_phase_before_it_checks_the_count(server, tmp_path, monkeypatch):
|
||||
monkeypatch.setattr(config, "merge_segments", True)
|
||||
calls: list[str] = []
|
||||
monkeypatch.setattr(SegmentStore, "merging", lambda self: calls.append("merging"))
|
||||
monkeypatch.setattr(ism_module, "check_merged", lambda *args: calls.append("check_merged"))
|
||||
|
||||
ISM.download_track(ism_track(server), make_ctx(tmp_path, "audio.mp4"))
|
||||
|
||||
assert calls == ["merging", "check_merged"]
|
||||
|
||||
Reference in New Issue
Block a user