DEVX-136: feat: add fix_pr_title module and update_pr API method
Post-merge / detect-and-configure (push) Successful in 12s
Post-merge / release-and-maintain (push) Successful in 1m0s

This commit was merged in pull request #203.
This commit is contained in:
2026-07-13 23:55:11 +00:00
parent 68f0872134
commit ddfbdec956
32 changed files with 2761 additions and 322 deletions
+7 -4
View File
@@ -1,7 +1,7 @@
from __future__ import annotations
from pathlib import Path
from unittest.mock import patch
from unittest.mock import MagicMock, patch
import pytest
from click.testing import CliRunner
@@ -87,14 +87,16 @@ class TestRunPlatform:
class TestMain:
def test_molecule_not_found(self, tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> None:
@patch("devx.molecule.molecule_all._run_molecule")
def test_molecule_not_found(self, mock_run: MagicMock, tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> None:
monkeypatch.chdir(tmp_path)
runner = CliRunner()
result = runner.invoke(molecule_all.main, ["--bin", "nonexistent/bin"])
assert result.exit_code != 0
assert "molecule not found" in result.output
def test_role_dir_not_found(self, tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> None:
@patch("devx.molecule.molecule_all._run_molecule")
def test_role_dir_not_found(self, mock_run: MagicMock, tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> None:
monkeypatch.chdir(tmp_path)
bin_dir = tmp_path / ".venv" / "bin"
bin_dir.mkdir(parents=True)
@@ -104,7 +106,8 @@ class TestMain:
assert result.exit_code != 0
assert "Role directory not found" in result.output
def test_role_dir_no_molecule(self, tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> None:
@patch("devx.molecule.molecule_all._run_molecule")
def test_role_dir_no_molecule(self, mock_run: MagicMock, tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> None:
"""Roles dir exists but no role has molecule/ — should error."""
monkeypatch.chdir(tmp_path)
bin_dir = tmp_path / ".venv" / "bin"