Skip to content

Commit cfe68e3

Browse files
committed
fix: use stdlib zipfile in test instead of python-docx
Address Copilot review: python-docx isn't in the base rootfs, so the test would fail with ModuleNotFoundError. Use stdlib zipfile.ZipFile directly to exercise the ZipInfo.__init__ monkey-patch. Signed-off-by: danbugs <danilochiarlone@gmail.com>
1 parent f95576d commit cfe68e3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

host/tests/pyhl_runtime.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ fn runtime_zipinfo_patch_survives_cleanup() {
127127
return;
128128
};
129129
let timing = rt
130-
.run_code("from docx import Document\ndoc = Document()\nprint('ok')")
130+
.run_code("import zipfile, io\nbuf = io.BytesIO()\nwith zipfile.ZipFile(buf, 'w') as z:\n z.writestr('test.txt', 'hello')\nprint('ok')")
131131
.unwrap();
132132
assert_eq!(timing.exit_code, 0);
133133
}

0 commit comments

Comments
 (0)