Skip to content

Add missing test for select.select()#7953

Merged
youknowone merged 1 commit into
RustPython:mainfrom
im-0:add-missing-select-test
May 24, 2026
Merged

Add missing test for select.select()#7953
youknowone merged 1 commit into
RustPython:mainfrom
im-0:add-missing-select-test

Conversation

@im-0
Copy link
Copy Markdown
Contributor

@im-0 im-0 commented May 22, 2026

This is a follow up for #7948

Summary by CodeRabbit

  • Tests
    • Expanded test coverage for select validation with additional edge case scenarios on UNIX-like systems.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 22, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: 338fb902-9a0a-442e-9810-4289c3b32671

📥 Commits

Reviewing files that changed from the base of the PR and between f3b83ef and 9f61679.

📒 Files selected for processing (1)
  • extra_tests/snippets/stdlib_select.py

📝 Walkthrough

Walkthrough

This PR adds a test case that verifies select.select() raises ValueError when called with the maximum file descriptor among created socketpair sockets on POSIX systems, extending existing bitmask overflow test coverage.

Changes

Select FD validation test

Layer / File(s) Summary
Max FD single socket edge case test
extra_tests/snippets/stdlib_select.py
On non-Windows platforms, the test scans created sockets to find the maximum file descriptor, then verifies that select.select() raises ValueError when called with only that max-fd socket and a zero timeout.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • RustPython/RustPython#7948: Both PRs target select.select()'s handling of "too many file descriptors" by adding/extending regression coverage and enforcing FD_SETSIZE limits with proper ValueError assertion instead of panic.

Suggested reviewers

  • ShaharNaveh
  • youknowone

Poem

🐰 A socket seeks the limit's edge,
Where file descriptors pledge,
No panic, just a ValueError raised,
Our test now has this path glazed!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Add missing test for select.select()' is directly related to the main change, which adds a new test for the select.select() function in stdlib_select.py.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@youknowone youknowone merged commit b9efe10 into RustPython:main May 24, 2026
30 of 32 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