Rewrite CLI around action runtime

This commit is contained in:
2026-05-14 13:14:38 +03:00
parent 0dc90f9005
commit 3503d81b06
28 changed files with 2778 additions and 574 deletions

View File

@@ -57,8 +57,8 @@ class TestPackageService:
monkeypatch.setattr(paths, "INSTALLED_STATE", tmp_path / "installed.json")
ctx = _make_ctx(tmp_path)
svc = PackageService(ctx)
svc.remove(["missing"])
assert "No matching" in capsys.readouterr().out
with pytest.raises(FlowError, match="not installed"):
svc.remove(["missing"])
def test_install_requires_args(self, tmp_path, monkeypatch):
monkeypatch.setattr(paths, "INSTALLED_STATE", tmp_path / "installed.json")
@@ -106,7 +106,7 @@ class TestPackageService:
def read(self):
return archive_bytes
monkeypatch.setattr("flow.services.packages.urllib.request.urlopen", lambda *args, **kwargs: FakeResponse())
monkeypatch.setattr("flow.adapters.download.urllib.request.urlopen", lambda *args, **kwargs: FakeResponse())
manifest = {
"packages": [{
@@ -176,7 +176,7 @@ class TestPackageService:
raise urllib.error.URLError("Network unreachable")
monkeypatch.setattr(
"flow.services.packages.urllib.request.urlopen", _raise,
"flow.adapters.download.urllib.request.urlopen", _raise,
)
manifest = {