fix: Befunde aus der QA-Prüfung (Prompt_Kontrolle.md)
- F1: Nicht beschreibbares Ausgabeziel liefert eine verständliche Meldung und Exit 1 statt "Interner Fehler" (Exit 4). - F2: Anker von <dt id> stehen vor dem fett gesetzten Glossarbegriff statt innerhalb der **-Marker. - F3: Formeln als <img src="*.svg"> erscheinen im Bericht mit origin "svg" statt "image". Regressionstests für alle drei Befunde ergänzt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
02449734a2
commit
3b07fcf01a
1 changed files with 54 additions and 13 deletions
|
|
@ -124,3 +124,20 @@ def test_example_books_structural_invariants(convert, epub: Path):
|
|||
for m in report["media"]["files"]:
|
||||
assert (run.out / m["file"]).is_file()
|
||||
assert sum(c["stats"]["word_count"] for c in report["chapters"]) > 1000
|
||||
|
||||
|
||||
def test_unwritable_output_parent_gives_clear_error(convert, tmp_path):
|
||||
"""QA-F1: a permission problem at the target must not be reported as internal error (exit 4)."""
|
||||
import os
|
||||
import stat
|
||||
|
||||
parent = tmp_path / "readonly"
|
||||
parent.mkdir()
|
||||
os.chmod(parent, stat.S_IRUSR | stat.S_IXUSR)
|
||||
try:
|
||||
run = convert(simple_book(), out=parent / "ziel")
|
||||
finally:
|
||||
os.chmod(parent, stat.S_IRWXU)
|
||||
assert run.rc == 1
|
||||
assert "Interner Fehler" not in run.stderr
|
||||
assert "nicht beschreibbar" in run.stderr or "Schreibfehler" in run.stderr
|
||||
|
|
|
|||
Loading…
Reference in a new issue