From a43b683d0838e64bb0d30d776f7cb98808e4f694 Mon Sep 17 00:00:00 2001 From: Alex Waygood Date: Tue, 1 Apr 2025 19:27:55 +0100 Subject: [PATCH] mdtest.py: do a full mdtest run immediately when the script is executed (#17128) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 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. --- crates/red_knot_python_semantic/mdtest.py | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/red_knot_python_semantic/mdtest.py b/crates/red_knot_python_semantic/mdtest.py index 6dabed368e..a82edee782 100644 --- a/crates/red_knot_python_semantic/mdtest.py +++ b/crates/red_knot_python_semantic/mdtest.py @@ -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):