Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions tests/ebuild/test_dispatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand All @@ -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()