DEVX-60: feat: add create-task, create-pr, pre-push-check tools and devx.mak fragment
Post-merge / detect-type (push) Successful in 6s
Post-merge / validate-commit-msg (push) Successful in 6s
Post-merge / configure-repo (push) Successful in 9s
Post-merge / release (push) Successful in 1m0s
Post-merge / vikunja (push) Successful in 14s
Post-merge / sync-wiki (push) Successful in 59s
Post-merge / badges (push) Successful in 1m12s

This commit was merged in pull request #98.
This commit is contained in:
2026-06-26 14:29:47 +00:00
parent a3d528f802
commit 44c906a5e6
25 changed files with 1378 additions and 4 deletions
+28
View File
@@ -186,6 +186,12 @@ class TestVerify:
mock_run.side_effect = subprocess.TimeoutExpired(cmd="devx", timeout=10)
_verify(".venv/bin") # Should not raise
@patch("devx.tools.setup.subprocess.run")
def test_verify_handles_nonzero_returncode(self, mock_run: MagicMock) -> None:
"""When a tool returns non-zero, it is skipped without raising."""
mock_run.return_value = MagicMock(returncode=1, stdout="", stderr="error")
_verify(".venv/bin") # Should not raise
class TestMain:
@patch("devx.tools.setup._configure_tea_login")
@@ -304,6 +310,28 @@ class TestMain:
assert result.exit_code != 0
assert "Bin directory not found" in result.output
@patch("devx.tools.setup._verify")
@patch("devx.tools.setup._configure_tea_login")
@patch("devx.tools.setup._install_pre_commit_hooks")
@patch("devx.tools.setup._install_ansible_collections")
@patch("devx.tools.setup._install_python_deps")
def test_main_skip_install(
self,
mock_install_deps: MagicMock,
mock_install_ansible: MagicMock,
mock_install_hooks: MagicMock,
mock_verify: MagicMock,
mock_tea: MagicMock,
tmp_path: Path,
) -> None:
bin_dir = tmp_path / "bin"
bin_dir.mkdir()
runner = CliRunner()
result = runner.invoke(main, ["--bin", str(bin_dir), "--skip-install"])
assert result.exit_code == 0
mock_install_deps.assert_not_called()
assert "Skipping pip install" in result.output
def test_main_module_block(tmp_path: Path) -> None:
"""Test the __main__ block execution."""