Applied from merzleckeier's follow-up (f9456e020), unchanged: the two render()
calls use the parent's numpy and Pillow, and the three CLI validation checks
finish before the child needs numpy, so all five should run rather than skip.
The two PNG preview subprocesses need Pillow in the child, which the isolated
probe now checks.
Written with an AI assistant.
The same in-process numpy check, in the file whose CLI tests spawn
`python -I`: HAVE_NUMPY stayed for the tests that call numpy here, and the
nine CLI gates now use NUMPY_VISIBLE_TO_TOOL, the isolated probe.
Measured on main b8bd37111, Windows 11, Python 3.13: 3 failed, 23 passed,
5 skipped before; 21 passed, 10 skipped after. Where -I sees numpy the probe
returns true and every gate opens as before.
Written with an AI assistant.
Guard the remaining unguarded os.link() calls in test_awc_names.py, test_gamedata_graph.py, test_navmesh_decode.py, test_restofworld_index.py, test_rtti_scan.py, test_save_keys.py, test_swizzle_search.py, and test_tex_headers_report_paths.py with try/except (OSError, NotImplementedError) so only the hard-link subtest/check is skipped when hard links are unavailable and the rest of each test still runs.
main() opened the blob unguarded, so a path that does not exist, or any other
file I/O failure, escaped as a FileNotFoundError traceback and exited 1. Every
other tool in tools/ reports a missing input as one ERROR line and exits 2, and
#948 fixed the same thing in world_index.py; this was the last one left.
Read the blob inside a try/except OSError and name the file that failed. Nothing
is written before the input is read.
Test: tests/test_swizzle_search.py runs the CLI on a missing path and asserts
exit 2, the ERROR line naming it, and no traceback.
🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
test_preview_with_no_fitting_layout_reports_the_problem runs the tool,
which imports numpy before it parses its arguments, so without numpy the
test sees a ModuleNotFoundError traceback instead of "no layout" and
fails. Its neighbours that run the CLI already skip without numpy. CI's
Windows check job has no numpy, so this is its next failure once the
mem_diff one (#533) is fixed. The pytest wrapper of the same test skips
too.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>