[update_lib] Fix async func auto-mark by youknowone · Pull Request #6903 · RustPython/RustPython
Caution
Review failed
The pull request is closed.
📝 Walkthrough
Walkthrough
Adds multiline test-result parsing, UNEXPECTED SUCCESS and error-message extraction, async super-call detection (including awaited super calls), and async-test tracking with generation of async wrappers during patch creation.
Changes
| Cohort / File(s) | Summary |
|---|---|
Test parsing & super-call detection scripts/update_lib/cmd_auto_mark.py |
Adds _try_parse_test_info(); extends parse_results() to handle multiline test entries, pending test info, UNEXPECTED SUCCESS, and error-message extraction; updates _is_super_call_only() to unwrap Await for async methods. |
Async-aware patch generation scripts/update_lib/patch_spec.py |
Adds async_methods detection (scans for AsyncFunctionDef) and emits async def wrappers (with await super()...) for async tests while preserving sync wrapper behavior and decorator handling. |
Unit tests scripts/update_lib/tests/test_auto_mark.py |
Adds new tests (~+166 LOC) covering multiline parsing, UNEXPECTED SUCCESS handling, async super-call cases, and Phase 2 inherited-test wrapper generation for both async and sync tests. |
Sequence Diagram(s)
(omitted)
Estimated code review effort
🎯 3 (Moderate) | ⏱️ ~25 minutes
Possibly related PRs
- Add tool for easier test updates #6089: Related changes to test-patch generation and handling of async test wrappers and AsyncFunctionDef scanning.
- rename fix_test and support removing unexpected success #6748: Overlaps test-result parsing and async super-call detection including UNEXPECTED SUCCESS handling.
Suggested reviewers
- moreal
- ShaharNaveh
Poem
🐰
I nibble through lines of test and thread,
Multiline whispers traced and read,
Awaiting super with a nimble hop,
Async wrappers ready — non-stop,
Hooray — the patch-carrot’s on the top!
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check | ✅ Passed | The title '[update_lib] Fix async func auto-mark' directly and clearly summarizes the main change: fixing async function handling in the auto-mark utility, which is the primary focus of all file modifications. |
| Docstring Coverage | ✅ Passed | Docstring coverage is 93.75% which is sufficient. The required threshold is 80.00%. |
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
✨ Finishing touches
- 📝 Generate docstrings
🧪 Generate unit tests (beta)
- Create PR with unit tests
- Post copyable unit tests in a comment
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.
Comment @coderabbitai help to get the list of available commands and usage tips.