Skip to content

Commit 23e2a99

Browse files
committed
Use deps command to get dependent tests in upgrade-pylib workflow
1 parent 46aaf77 commit 23e2a99

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

.claude/commands/upgrade-pylib.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,18 @@ This helps improve the tooling for future upgrades.
4949
- When restoring, preserve the original context and formatting
5050

5151
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:
5353
```
54-
cargo run --release -- -m unittest test.$ARGUMENTS -v 2>&1 | grep -E "^(FAIL|ERROR):"
54+
python3 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):"
5564
```
5665
- For each failure, use the Task tool with `general-purpose` subagent to investigate:
5766
- Subagent should follow the `/investigate-test-failure` skill workflow

0 commit comments

Comments
 (0)