Repository navigation
Fix test_live nested object file test that passed only by directory order - #635
Merged
Merged
Conversation
…ectory order _pointed took the first entry of objects/ with iterdir(), which is filesystem order. The nested-file test made objects/well first, so locally the pick was the directory, the replace in the manifest was a no-op and the test read write_fov's own file. On the CI runner the file came first, the manifest was really pointed at the nested file, and that file had no 'x' column. Pick only files, give the nested file the feature column, and assert its three objects were read. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WX6rdMV1r5jUPUR94kxV5a
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
tests/test_live.py::test_a_nested_relative_object_file_inside_the_folder_is_readfailed in the full lane (run 43263892651, Python 3.11) withobjects is missing required columns: ['x'], and passed locally.Root cause (test defect, no product change)
_pointedchose the file to re-point withnext((folder / "objects").iterdir()), which is filesystem order. The nested test createsobjects/well/beforewrite_fov, so:wellcame first, the manifestreplacematched nothing, and the test silently readwrite_fov's own file (it never exercised the nested path);objects/well/f.csv, and that file heldlabel_id, areabut not the session's feature columnx.The reader is correct: it refuses a table without the declared feature.
Change
_pointedpicks only files and asserts exactly one.xcolumn, and the test asserts the update holds its 3 objects (not the 5 ofwrite_fov), so it now really checks that the nested relative file is read.Verified on Python 3.11.15: before the
_pointedfix alone the test reproduced the CI error deterministically; after both changestests/test_live.pypasses (40 passed), ruff check and format clean.Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
Generated by Claude Code