ruff/crates/ty_python_semantic
David Peter d64b2f747c
[ty] Add filtering option for mdtest runner (#21422)
## Summary

This change to the mdtest runner makes it easy to run on a subset of
tests/files. For example:

```
▶ uv run crates/ty_python_semantic/mdtest.py implicit
running 1 test
test mdtest__implicit_type_aliases ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 281 filtered out; finished in 0.83s

Ready to watch for changes...
```

Subsequent changes to either that test file or the Rust source code will
also only rerun the `implicit_type_aliases` test.

Multiple arguments can be provided, and filters can either be partial
file paths (`loops/for.md`, `loops/for`, `for`) or mangled test names
(`loops_for`):
```
▶ uv run crates/ty_python_semantic/mdtest.py implicit binary/union

running 2 tests
test mdtest__binary_unions ... ok
test mdtest__implicit_type_aliases ... ok

test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 280 filtered out; finished in 0.85s

Ready to watch for changes...
```

## Test Plan

Tested it interactively for a while
2025-11-13 12:20:31 +00:00
..
resources [ty] Use the return type of __get__ for descriptor lookups even when __get__ is called with incorrect arguments (#21424) 2025-11-13 12:05:10 +00:00
src [ty] Use the return type of __get__ for descriptor lookups even when __get__ is called with incorrect arguments (#21424) 2025-11-13 12:05:10 +00:00
tests [ty] Limit shown import paths to at most 5 unless ty runs with -v (#20912) 2025-10-16 13:18:09 +02:00
build.rs
Cargo.toml [ty] Some more simplifications when rendering constraint sets (#21009) 2025-10-22 13:38:44 -04:00
mdtest.py [ty] Add filtering option for mdtest runner (#21422) 2025-11-13 12:20:31 +00:00
mdtest.py.lock