mdtest.py: do a full mdtest run immediately when the script is executed (#17128)

## Summary

Currently if I run `uv run crates/red_knot_python_semantic/mdtest.py`
from the Ruff repo root, I get this output:

```
~/dev/ruff (main) % uv run crates/red_knot_python_semantic/mdtest.py
Ready to watch for changes...
```

...And I then have to make some spurious whitespace changes or something
to a test file in order to get the script to actually run mdtest. This
PR changes mdtest.py so that it does an initial run of all mdtests when
you invoke the script, and _then_ starts watching for changes in test
files/Rust code.
This commit is contained in:
Alex Waygood 2025-04-01 19:27:55 +01:00 committed by GitHub
parent d29d4956de
commit a43b683d08
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -155,6 +155,7 @@ class MDTestRunner:
def watch(self) -> Never:
self._recompile_tests("Compiling tests...", message_on_success=False)
self._run_mdtest()
self.console.print("[dim]Ready to watch for changes...[/dim]")
for changes in watch(CRATE_ROOT):