Skip to content

tests: skip the swizzle_search no-layout CLI test without numpy - #547

Merged
ItsNotRexed merged 1 commit into
ItsNotRexed:mainfrom
BBareth:test/swizzle-search-numpy-skip
Nov 22, 2026
Merged

ItsNotRexed merged 1 commit into
ItsNotRexed:mainfrom
BBareth:test/swizzle-search-numpy-skip

Conversation

@BBareth

@BBareth BBareth commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

Claim: #374 (comment) (new TEST item)

Bug. TestSwizzleSearchCliAndRender.test_preview_with_no_fitting_layout_reports_the_problem runs tools/swizzle_search.py. The tool imports numpy at the top, before it parses arguments, so without numpy the test gets a ModuleNotFoundError traceback instead of no layout and fails. The other CLI tests in the class already carry @unittest.skipUnless(HAVE_NUMPY, ...). CI's Windows check job installs no numpy and stops at the first failing file. On main it currently stops earlier, at test_mem_diff.py (#533 fixes that one), so this is the next failure in line.

Fix. The test gets the same HAVE_NUMPY skip as its neighbours. The module-level pytest wrapper of the same test raises unittest.SkipTest without numpy, and pytest honours that.

Tested.

  • Without numpy (CI's check setup): python -I tests/test_swizzle_search.py gives OK (skipped=18) and pytest gives 19 skipped. On main the file fails with 1 failure.
  • With numpy and Pillow: python -I tests/test_swizzle_search.py is OK with all 18 run, and pytest gives 19 passed.
  • Python 3.12.15 on macOS arm64. CPU only, no game data. No GPU involved.

AI-assisted (Claude Code).

Checklist

  • No game data, keys or decryption, including in logs or reports.
  • Translator contract is inapplicable (tests only).

🤖 Generated with Claude Code

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 (ItsNotRexed#533) is fixed. The pytest wrapper of the same test skips
too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ItsNotRexed
ItsNotRexed merged commit ef55495 into ItsNotRexed:main Nov 22, 2026
5 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants