Skip to content

Transforms complex documents like PDFs and Office docs into LLM-ready markdown/JSON for your Agentic workflows.

test: stabilize ZIP artifact fixture timestamps

myhlolid129c237fb8b
diff --git a/tests/unittest/test_file_parse.py b/tests/unittest/test_file_parse.py
index 887a143f..b03a146f 100644
--- a/tests/unittest/test_file_parse.py
+++ b/tests/unittest/test_file_parse.py
@@ -38,7 +38,9 @@ def artifact_bytes(formats: list[str]) -> bytes:
return b"<!doctype html><html><body>file parse result</body></html>"
output = io.BytesIO()
with zipfile.ZipFile(output, "w") as archive:
- archive.writestr("word/document.xml" if formats == ["docx"] else "markdown.md", "file parse result")
+ name = "word/document.xml" if formats == ["docx"] else "markdown.md"
+ # 固定 ZIP 时间戳,避免上游响应和预期附件跨两秒时间边界后产生不同字节。
+ archive.writestr(zipfile.ZipInfo(name, date_time=(1980, 1, 1, 0, 0, 0)), "file parse result")
return output.getvalue()