docs: expand usage guide and localize csv output

This commit is contained in:
kim
2026-03-30 10:59:36 +08:00
parent 79370ed542
commit 4054cc87bb
3 changed files with 264 additions and 11 deletions
+9 -3
View File
@@ -56,8 +56,14 @@ def test_export_jsonl_and_csv_write_expected_content(tmp_path: Path) -> None:
export_csv_summary(sample_rows(), csv_path)
jsonl_text = jsonl_path.read_text(encoding="utf-8")
csv_text = csv_path.read_text(encoding="utf-8")
csv_text = csv_path.read_text(encoding="utf-8-sig")
csv_bytes = csv_path.read_bytes()
assert '"path":"a.mp4"' in jsonl_text
assert "final_status,reason_code,path,size" in csv_text
assert "confirmed_broken,ffprobe_exit_nonzero,a.mp4,100" in csv_text
assert csv_bytes.startswith(b"\xef\xbb\xbf")
assert (
"final_status,final_status_zh,reason_code,reason_code_zh,path,size"
in csv_text
)
assert "confirmed_broken,明确损坏,ffprobe_exit_nonzero" in csv_text
assert "ffprobe 返回非零退出码" in csv_text