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:
@@ -5,7 +5,6 @@ from collections.abc import Callable
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
from langcodes import Language
|
||||
|
||||
from unshackle.core.config import config
|
||||
from unshackle.core.tracks import Audio, Subtitle, Tracks
|
||||
@@ -61,17 +60,6 @@ def test_default_subtitle_index(language: str | None, types: list[str], expected
|
||||
assert Tracks.default_subtitle_index(subtitles, language, types) == expected
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
("audio", "expected"),
|
||||
[("en", 1), ("ar", 0), ("fr", 2), (None, 2)],
|
||||
)
|
||||
def test_a_forced_default_with_no_language_follows_the_audio(audio: str | None, expected: int) -> None:
|
||||
kinds = [("ar", "forced"), ("en", "forced"), ("en", "normal")]
|
||||
subtitles = [subtitle(i, lang, kind) for i, (lang, kind) in enumerate(kinds)]
|
||||
audio_language = Language.get(audio) if audio else None
|
||||
assert Tracks.default_subtitle_index(subtitles, None, ["forced", "normal"], audio_language) == expected
|
||||
|
||||
|
||||
def downloaded_tracks(tmp_path: Path, audio: list[tuple[str, bool]], subtitles: list[tuple[str, str]]) -> Tracks:
|
||||
tracks = Tracks()
|
||||
for i, (lang, original) in enumerate(audio):
|
||||
|
||||
Reference in New Issue
Block a user