chore: Glossare liegen lokal im Verzeichnis glossare/

Die Glossare echter Beiträge stehen nicht mehr lose im Programmordner,
sondern in glossare/ (in .gitignore). Tests und Beispiele in README und
Bedienungsanleitung verwenden die neuen Pfade.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Dieter Schlüter 2026-10-11 22:58:14 +02:00
commit acf9e33382

View file

@ -14,7 +14,9 @@ REPO = Path(__file__).resolve().parent.parent
# Own, made-up sample speech; real speeches are only kept locally in testdaten/
SAMPLE = REPO / "tests" / "daten" / "beispiel.de.txt"
GLOSSARY = REPO / "tests" / "daten" / "beispiel.glossar.txt"
SHARED_GLOSSARY = REPO / "krone-schmalz.glossar.txt"
# Real glossaries and speeches are only kept locally (see .gitignore)
GLOSSARIES = REPO / "glossare"
SHARED_GLOSSARY = GLOSSARIES / "krone-schmalz.glossar.txt"
SPEECHES = REPO / "testdaten"
# The autouse fixture below replaces it; tests of the real function use this
REAL_FIND_MERGE_SIDE = ak.find_merge_side
@ -135,7 +137,7 @@ SAMPLE_GLOSSARIES = [
# Real speeches and their glossaries are not in the repository; without them these skip
needs_speeches = pytest.mark.skipif(
not all(
(SPEECHES / sample).is_file() and (REPO / glossary).is_file()
(SPEECHES / sample).is_file() and (GLOSSARIES / glossary).is_file()
for glossary, sample in SAMPLE_GLOSSARIES
) or not SHARED_GLOSSARY.is_file(),
reason="echte Reden (testdaten/) und ihre Glossare nur lokal",
@ -155,7 +157,7 @@ def test_sample_glossary_replacements_all_match(capsys, glossary, sample):
text = flat((SPEECHES / sample).read_text(encoding="utf-8"))
text = ak.apply_replacements(text, ak.read_glossary(SHARED_GLOSSARY)[1])
capsys.readouterr()
ak.apply_replacements(text, ak.read_glossary(REPO / glossary)[1])
ak.apply_replacements(text, ak.read_glossary(GLOSSARIES / glossary)[1])
assert "ohne Treffer" not in capsys.readouterr().out