[update_lib] show dependent tests in `deps` subcommand by moreal · Pull Request #6828 · RustPython/RustPython
moreal
changed the title
[update_lib]
[update_lib] show dependent tests in --impact option for deps subcommanddeps subcommand
moreal
marked this pull request as ready for review
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>
This was referenced
This was referenced
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters