repositories
loading repo index
repositories
loading repo index
repository
loading code, commits, and activity
public Clawd ADK gateway launch mirror
stars
latest
clone command
git clone gitlawb://did:key:z6Mkq5mY...iFZ5/my-project-publ...git clone gitlawb://did:key:z6Mkq5mY.../my-project-publ...2fa351d6docs: add automaton and perps launch sources15d ago| #1 |
| """CLI operation-failure regression tests.""" |
| #2 |
| #3 | import os |
| #4 | import subprocess |
| #5 | import sys |
| #6 |
| #7 |
| #8 | def run_cli(args, tmp_path): |
| #9 | env = os.environ.copy() |
| #10 | env["HOME"] = str(tmp_path / "home") |
| #11 | env["MNEMOSYNE_DATA_DIR"] = str(tmp_path / "mnemosyne-data") |
| #12 | return subprocess.run( |
| #13 | [sys.executable, "-m", "mnemosyne.cli", *args], |
| #14 | text=True, |
| #15 | capture_output=True, |
| #16 | env=env, |
| #17 | check=False, |
| #18 | ) |
| #19 |
| #20 |
| #21 | def test_update_delete_missing_memory_report_operation_failure(tmp_path): |
| #22 | for args in (["update", "missing-id", "new content"], ["delete", "missing-id"]): |
| #23 | result = run_cli(args, tmp_path) |
| #24 |
| #25 | assert result.returncode == 1, args |
| #26 | assert result.stdout == "" |
| #27 | assert "Memory not found: missing-id" in result.stderr |
| #28 | assert "Traceback" not in result.stderr |
| #29 |