GeezerVison is showing github.com — Use deps command to get dependent tests in upgrade-pylib workflow · RustPython/RustPython@d24423b
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: .claude/commands/upgrade-pylib.md +11-2Lines changed: 11 additions & 2 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -49,9 +49,18 @@ This helps improve the tooling for future upgrades. |
49 | 49 | - When restoring, preserve the original context and formatting |
50 | 50 |
|
51 | 51 | 3. **Investigate test failures with subagent** |
52 | | - - First, run tests to collect the list of failures: |
| 52 | + - First, get dependent tests using the deps command: |
53 | 53 | ``` |
54 | | - cargo run --release -- -m unittest test.$ARGUMENTS -v 2>&1 | grep -E "^(FAIL|ERROR):" |
| 54 | + cargo run --release -- scripts/update_lib deps $ARGUMENTS |
| 55 | + ``` |
| 56 | + - Look for the line `- [ ] $ARGUMENTS: test_xxx test_yyy ...` to get the direct dependent tests |
| 57 | + - Run those tests to collect failures: |
| 58 | + ``` |
| 59 | + cargo run --release -- -m test test_xxx test_yyy ... 2>&1 | grep -E "^(FAIL|ERROR):" |
| 60 | + ``` |
| 61 | + - For example, if deps output shows `- [ ] linecache: test_bdb test_inspect test_linecache test_traceback test_zipimport`, run: |
| 62 | + ``` |
| 63 | + cargo run --release -- -m test test_bdb test_inspect test_linecache test_traceback test_zipimport 2>&1 | grep -E "^(FAIL|ERROR):" |
55 | 64 | ``` |
56 | 65 | - For each failure, use the Task tool with `general-purpose` subagent to investigate: |
57 | 66 | - Subagent should follow the `/investigate-test-failure` skill workflow |
|