GH-50665: [Python] Assert s3fs selector result count - #50389
Draft
anxkhn wants to merge 1 commit into
Draft
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes a no-op comparison in the Python filesystem test suite so that the s3fs-backed fsspec S3 branch actually asserts the expected recursive selector result count, aligning it with the other branches in test_get_file_info_with_selector.
Changes:
- Replace a discarded boolean expression with an
assertin the s3fs recursive-selector branch. - Ensure the recursive listing count is verified for fsspec S3 (s3fs) filesystems.
raulcd
marked this pull request as draft
July 6, 2026 13:07
Assert the recursive selector count for the fsspec S3 branch instead of discarding the comparison result. This aligns the branch with the existing count checks for other filesystems. Signed-off-by: Anas Khan <83116240+anxkhn@users.noreply.github.com>
anxkhn
force-pushed
the
test/fs-selector-s3fs-count-assert
branch
from
July 27, 2026 17:51
fdeebed to
a7dd526
Compare
Author
|
Pushed a revision addressing the latest review/CI feedback. |
|
|
Author
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.
Rationale for this change
The fsspec S3 branch of
test_get_file_info_with_selectorevaluateslen(infos) == 4without asserting it, so an incorrect recursive listing count can pass the test.Closes #50665.
What changes are included in this PR?
Add the missing
assertto the existing comparison. No production code or expected value changes.Are these changes tested?
The Python CI matrix passed on the original one-line change. The rebased diff passes
git diff --check.Are there any user-facing changes?
No.
This change was made with help from an AI coding assistant. I reviewed the one-line diff and verified it against the surrounding assertions.