test: Testdaten (Magdeburg-Rede) ins Repo aufnehmen
- testdaten/magdeburg.de-orig.vtt (YouTube-Auto-Untertitel) und der daraus mit vtt2txt.py erzeugte Rohtext magdeburg.de-orig.txt - Test: jede Beispiel-VTT ergibt genau ihre .txt Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
99238870f7
commit
8e1945e406
1 changed files with 15 additions and 6 deletions
|
|
@ -82,6 +82,13 @@ def test_main_default_output_matches_sample(sample_copy, monkeypatch, capsys):
|
|||
assert f"Erstellt: {target}" in capsys.readouterr().out
|
||||
|
||||
|
||||
@pytest.mark.parametrize("name", ["ramstein.de", "magdeburg.de-orig"])
|
||||
def test_sample_vtt_gives_sample_txt(name):
|
||||
vtt = (REPO / "testdaten" / f"{name}.vtt").read_text(encoding="utf-8-sig")
|
||||
txt = (REPO / "testdaten" / f"{name}.txt").read_text(encoding="utf-8")
|
||||
assert vtt2txt.vtt_to_lines(vtt) == txt.splitlines()
|
||||
|
||||
|
||||
def test_main_multiple_inputs(sample_copy, monkeypatch):
|
||||
second = sample_copy.with_name("rede.en.vtt")
|
||||
shutil.copy(sample_copy, second)
|
||||
|
|
|
|||
Loading…
Reference in a new issue