Repository navigation
Conversation
…t behind e6190e7 (ItsNotRexed#6917) added target_problem: a single named file that is neither a KB2 stream nor an RPF archive is one error line instead of a successful scan of 0 streams. It updated the assertion at tests/test_bink_index.py:260 to the new wording and missed the one in test_a_single_named_file_that_is_not_a_stream_or_rpf_is_refused, and tests/test_report_source_collision.py built its .bk2 as plain text, which the tool now rightly refuses. The refusal is documented in the tool's docstring and happens before the source-overwrites guard is even relevant, so the tool is right and the fixtures were stale: make_bink() now writes the same minimal KB2 header tests/test_bink_index.py already builds, with the sentinel after it so the file is still recognisable as the source that must not be replaced. On b2801e2, before: test_report_source_collision.py Ran 8 tests FAILED (failures=1), test_bink_index.py Ran 32 tests FAILED (failures=1). After: 8/8 OK and 32/32 OK. CPU-only: no device, no game data.
|
Tested 9ceb642 on Linux (kernel 7.2), Python 3.14.8, CPU only: pass On Same result as #7092, which fixes the same two tests; only one of them is needed. AI-assisted check (Claude Code); counts and pass/fail only, no game data. |
|
Tested 9ceb642 merged onto main 48ff424 on Windows 11, CPython 3.14.4, CPU only, no game files: pass.
AI-assisted (Claude Code). |
|
Tested 9ceb642 on Windows 11 (CPU only, no GPU needed): pass Windows 11 Pro, Python 3.14.7, CPU only (no GPU or game files involved); pytest/numpy/Pillow pinned from
AI-assisted (Claude Code, Claude Opus 5.5). |
|
Independent check (Linux, Python 3.12.3, Node 24.13, CPU only, no game files): head
Fixes AI-assisted (Claude Code). |
|
Tested 9ceb642 on Windows 11, Python 3.15.2, NVIDIA RTX 4060 Ti (driver 621.24; CPU-only checks, no game files, no GPU/llvm-mc/MSVC used): pass. Ran the test files this PR adds or changes, from a clean checkout of the PR head: AI-assisted (Claude Code). |
|
Tested
For whoever merges: #7092 turns the same two files green, edits the same test lines and also changes the tool's wording for the second guard, so the two should not both go in as they are; #7914 repairs Independent check (not the author). Run by an AI agent (DeepSeek V4.1 Flash) and re-run by the orchestrating session (Claude Code) before posting; claimed in #8047. |
|
Checked
Host caveat: Python 3.15 against CI's 3.12; both changes are assertions and a synthetic fixture. AI-assisted: yes (Windows host, CPU-only, no GPU and no game files). |
|
Tested 9ceb642 on Windows 11 Pro (26300), Python 3.15.2, CPU only: pass. Merged onto main 5d74c27 (no conflicts);
Note: #8392 (the bink_index message) and #8329 (the collision fixture) fix the same two tests and also pass on main, so only one of these should land. AI-assisted (Claude Code). |
tests: bink_index's named-file refusal has the wording its tests now check
Two test expectations were left behind by
e6190e7b5("bink_index: a single named file that holds no stream is one error line, not a 0-stream scan", #6917), which addedtarget_problemand the refusal for a named file that is neither a KB2 stream nor an RPF archive. That commit updated the assertion attests/test_bink_index.py:260to the new message and missed the one intest_a_single_named_file_that_is_not_a_stream_or_rpf_is_refused, which still looks for"not a Bink 2 stream or an RPF archive"without the(KB2).tests/test_report_source_collision.pyis red for the same tool change from the other side:make_bink()was just the sentinel text, which is not something the tool indexes, andtest_a_distinct_report_path_still_worksasks for a successful run. The guard order says which side is wrong:main()rejects an--outequal to the source at line 358, before it reads the file at 379, and the refusal is documented in the tool's own docstring ("A single named file has to start withKB2or an RPF header") because a mislabelled path used to come back as a successful scan of 0 streams. The tool is doing what it now says; the fixture was the thing that no longer described a real Bink 2 stream, somake_bink()builds the same minimal headertests/test_bink_index.py:69already uses —KB2a,size8 = 40, one frame, 16x16, 30/1 fps — with the sentinel after it so the file is still recognisable as the source the tool must not replace. That keeps both halves of the test intact: the refusal of--out == source, and a normal run that indexes one stream and leaves the input untouched.Tested
CPU-only on
b2801e26e, Windows 11, CPython 3.13; no device and no game data.python -I tests/test_report_source_collision.py→Ran 8 tests … FAILED (failures=1)(bink_index: error: …x.bk2: not a Bink 2 stream (KB2) or an RPF archive);python -I tests/test_bink_index.py→Ran 32 tests … FAILED (failures=1).Ran 8 tests OKandRan 32 tests OK.python -I -m unittest discover -s tests -p "test_bink_*.py"→Ran 74 tests, one failure,test_bink_names.TestCli.test_unreadable_mount_directory_preserves_the_report, which fails identically on plainb2801e26ewith my changes stashed — a Windows-specific thing about how an unreadable directory is reported, unrelated to this change and left to whoever owns it.AI-assisted.