diff --git a/tests/ebuild/test_dispatch.py b/tests/ebuild/test_dispatch.py index d4d75f7..fb64bb2 100644 --- a/tests/ebuild/test_dispatch.py +++ b/tests/ebuild/test_dispatch.py @@ -204,6 +204,7 @@ def test_configure_ninja_raises_instead_of_silently_passing(self, tmp_path): d = BackendDispatcher(tmp_path, tmp_path / "build") with pytest.raises(UnknownBackendError, match="ninja"): d.configure("ninja") + assert not (tmp_path / "build").exists() def test_ninja_error_explains_the_targets_requirement(self, tmp_path): """The message must be actionable, not just a rejection.""" @@ -227,8 +228,10 @@ def test_clean_still_accepts_ninja(self, tmp_path): d = BackendDispatcher(tmp_path, tmp_path / "build") d.clean("ninja", dry_run=True) # must not raise - def test_no_configure_step_backends_stay_noops(self, tmp_path): + @patch("ebuild.build.dispatch.subprocess") + def test_no_configure_step_backends_stay_noops(self, mock_sub, tmp_path): """cargo/make/kbuild are accepted-and-skipped, not errors.""" d = BackendDispatcher(tmp_path, tmp_path / "build") for backend in ("cargo", "make", "kbuild"): - d.configure(backend) # must not raise + d.configure(backend) + mock_sub.run.assert_not_called()