mirror of https://github.com/astral-sh/ruff
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:
parent
d29d4956de
commit
a43b683d08
|
|
@ -155,6 +155,7 @@ class MDTestRunner:
|
||||||
|
|
||||||
def watch(self) -> Never:
|
def watch(self) -> Never:
|
||||||
self._recompile_tests("Compiling tests...", message_on_success=False)
|
self._recompile_tests("Compiling tests...", message_on_success=False)
|
||||||
|
self._run_mdtest()
|
||||||
self.console.print("[dim]Ready to watch for changes...[/dim]")
|
self.console.print("[dim]Ready to watch for changes...[/dim]")
|
||||||
|
|
||||||
for changes in watch(CRATE_ROOT):
|
for changes in watch(CRATE_ROOT):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue