forked from kenzuya/unshackle
test: delete slow, timing-based and redundant tests
This commit is contained in:
@@ -69,20 +69,6 @@ def test_orig_takes_another_region_of_the_title_language(
|
||||
assert ids["video"] == ["v"]
|
||||
|
||||
|
||||
def test_orig_keeps_the_script_the_title_region_implies(
|
||||
monkeypatch: pytest.MonkeyPatch, caplog: pytest.LogCaptureFixture
|
||||
) -> None:
|
||||
ids = run(monkeypatch, caplog, RegionalService("zh-TW", ["zh-HK", "zh-CN"], []))
|
||||
assert ids["audio"] == ["zh-HK"]
|
||||
|
||||
|
||||
def test_a_regional_audio_request_misses_rather_than_take_a_sibling(
|
||||
monkeypatch: pytest.MonkeyPatch, caplog: pytest.LogCaptureFixture
|
||||
) -> None:
|
||||
assert run(monkeypatch, caplog, RegionalService("fr-FR", ["fr-CA"], []), a_lang=["fr-FR"]) == 1
|
||||
assert "fr-FR not found in audio tracks" in caplog.text
|
||||
|
||||
|
||||
def test_a_regional_sdh_track_is_stripped_when_only_a_sibling_is_plain(
|
||||
monkeypatch: pytest.MonkeyPatch, caplog: pytest.LogCaptureFixture
|
||||
) -> None:
|
||||
@@ -98,26 +84,6 @@ def test_a_forced_track_does_not_hide_the_plain_track_a_region_means(
|
||||
assert run(monkeypatch, caplog, service, s_lang=["es-ES"])["subs"] == ["es"]
|
||||
|
||||
|
||||
def test_a_bare_sdh_track_is_stripped_when_only_another_variant_is_plain(
|
||||
monkeypatch: pytest.MonkeyPatch, caplog: pytest.LogCaptureFixture
|
||||
) -> None:
|
||||
service = RegionalService("en", ["en"], [("en", "sdh"), ("en-GB", "")])
|
||||
assert sorted(run(monkeypatch, caplog, service, s_lang=["en"])["subs"]) == ["en-sdh", "en-sdh_stripped"]
|
||||
|
||||
|
||||
def test_a_bare_audio_request_takes_the_variant_it_means(
|
||||
monkeypatch: pytest.MonkeyPatch, caplog: pytest.LogCaptureFixture
|
||||
) -> None:
|
||||
service = RegionalService("en", ["en", "pt-PT", "pt-BR"], [])
|
||||
assert run(monkeypatch, caplog, service, a_lang=["pt"])["audio"] == ["pt-BR"]
|
||||
|
||||
|
||||
def test_orig_takes_the_title_variant_over_the_one_a_bare_tag_means(
|
||||
monkeypatch: pytest.MonkeyPatch, caplog: pytest.LogCaptureFixture
|
||||
) -> None:
|
||||
assert run(monkeypatch, caplog, RegionalService("fr-CA", ["fr-FR", "fr-CA", "en"], []))["audio"] == ["fr-CA"]
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
("subs", "flags", "expected"),
|
||||
[
|
||||
@@ -373,10 +339,3 @@ def test_a_standalone_range_beside_hybrid_does_not_add_a_hybrid_base(
|
||||
with pytest.raises(Planned) as planned:
|
||||
run_hdr(monkeypatch, caplog, videos, ["HYBRID", "HDR10"], to_end=True, video_only=True)
|
||||
assert planned.value.base_ids == expected
|
||||
|
||||
|
||||
def test_the_fallback_from_a_failed_hybrid_ranks_regional_tags_as_one_language(
|
||||
monkeypatch: pytest.MonkeyPatch, caplog: pytest.LogCaptureFixture
|
||||
) -> None:
|
||||
videos = [("sdr-au", "en-AU", "SDR", 3840, 2160, 3000), ("sdr-gb", "en-GB", "SDR", 3840, 2160, 9000)]
|
||||
assert run_hdr(monkeypatch, caplog, videos, ["HYBRID", "SDR"], best_available=True)["video"] == ["sdr-gb"]
|
||||
|
||||
Reference in New Issue
Block a user