Skip to content

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

Set default OUTPUT_DIR for downloads in test_http_api_example_script.py to prevent leaks into pytest cwd

myhloli16e9242cdcbe
diff --git a/tests/unittest/test_http_api_example_script.py b/tests/unittest/test_http_api_example_script.py
index 0919415a..d872cae5 100644
--- a/tests/unittest/test_http_api_example_script.py
+++ b/tests/unittest/test_http_api_example_script.py
@@ -82,6 +82,9 @@ def _script_env(tmp_path: Path, **extra: str) -> dict[str, str]:
"HOME": os.environ.get("HOME", str(tmp_path)),
"TMPDIR": str(tmp_path),
"MINERU_HOME": str(tmp_path / "mineru-home"),
+ # Default to a tmp dir so downloads never leak into the pytest cwd (repo root);
+ # an explicit OUTPUT_DIR in extra overrides this.
+ "OUTPUT_DIR": str(tmp_path / "out"),
}
for key in ("LANG", "LC_ALL"):
if key in os.environ: