◐ Shell
clean mode source ↗

[update_lib] show dependent tests in `deps` subcommand by moreal · Pull Request #6828 · RustPython/RustPython

@youknowone added the skip:ci

Skip running the ci

label

Jan 21, 2026

@moreal moreal changed the title [update_lib] --impact option for deps subcommand [update_lib] show dependent tests in deps subcommand

Jan 21, 2026

@moreal moreal marked this pull request as ready for review

January 21, 2026 15:12

coderabbitai[bot]

Extend find_tests_importing_module() and _build_test_import_graph() to
recursively search Lib/test/test_*/ directories using **/*.py glob
pattern instead of just *.py.

This fixes incomplete dependency analysis that was missing test files
inside module directories like test_json/, test_importlib/, etc.

Changes:
- Add _parse_test_submodule_imports() to handle "from test.X import Y"
- Update _build_test_import_graph() with recursive glob and submodule
  import handling
- Update find_tests_importing_module() to use relative paths and handle
  __init__.py files correctly
- Update show_deps.py to display relative paths (e.g., test_json/test_decode.py)
- Add TestFindTestsInModuleDirectories test class with 3 tests

Co-Authored-By: Claude <noreply@anthropic.com>
Add consolidate_test_paths() to group test_*/ directory contents into
single entries (e.g., test_sqlite3/test_dbapi.py → test_sqlite3).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Outputs space-separated test names for direct use with python3 -m test:
  python3 -m test $(python3 scripts/update_lib deps sqlite3 --impact-only)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove --impact flag, dependent tests are now shown by default
- Rename --impact-only to --dependent-tests-only
- Change output label from "[+] impact:" to "[+] dependent tests:"

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

@youknowone

@youknowone

@youknowone

@github-actions

This was referenced

Jan 23, 2026

This was referenced

Feb 25, 2026