test(md2doc): style smoke test for all 5 styles
This commit is contained in:
@@ -0,0 +1,19 @@
|
|||||||
|
"""Smoke test — all 5 styles produce valid DOCX from same input."""
|
||||||
|
import subprocess
|
||||||
|
import sys
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
REPO = Path(__file__).parent.parent
|
||||||
|
|
||||||
|
|
||||||
|
def test_all_styles_produce_valid_docx(tmp_path):
|
||||||
|
fixture = REPO / "pluxee-todo.md"
|
||||||
|
for style in ("elegant", "report", "default", "dark", "mono"):
|
||||||
|
out = tmp_path / f"pluxee-{style}.docx"
|
||||||
|
r = subprocess.run(
|
||||||
|
[sys.executable, "md2doc.py", str(fixture), "-o", str(out), "--style", style, "-q"],
|
||||||
|
cwd=REPO, capture_output=True, text=True
|
||||||
|
)
|
||||||
|
assert r.returncode == 0, f"style={style} failed: stderr={r.stderr}"
|
||||||
|
assert out.exists()
|
||||||
|
assert out.stat().st_size > 1000, f"style={style} produced too-small file"
|
||||||
Reference in New Issue
Block a user