feat(agents): add Crush and disable usage tracking

This commit is contained in:
Ryan Yin authored and ryan4yin | 二花 committed 2026-09-18 21:20:33 +08:00
1 parent 23258a06d4
commit bcee9f2ac8
9 files changed
+85 -21

No files matched your search

+4 -3
View File
@@ -23,6 +23,7 @@ class InstallRulesTests(unittest.TestCase):
(home / ".config" / "opencode", "AGENTS.md"),
(home / ".pi" / "agent", "AGENTS.md"),
(home / ".omp" / "agent", "AGENTS.md"),
(home / ".config" / "crush", "CRUSH.md"),
(home / ".agents", "AGENTS.md"),
)
for target_dir, _ in target_names:
@@ -41,18 +42,18 @@ class InstallRulesTests(unittest.TestCase):
patch.object(
installer,
"install_one",
side_effect=[PermissionError("denied"), None, None, None, None],
side_effect=[PermissionError("denied"), None, None, None, None, None],
) as install,
patch("sys.stderr", new_callable=io.StringIO) as stderr,
):
self.assertEqual(installer.main(), 1)
self.assertEqual(install.call_count, 5)
self.assertEqual(install.call_count, 6)
self.assertIn("denied", stderr.getvalue())
def test_successful_targets_return_success(self):
with patch.object(installer, "install_one") as install:
self.assertEqual(installer.main(), 0)
self.assertEqual(install.call_count, 5)
self.assertEqual(install.call_count, 6)
def test_existing_file_is_backed_up_without_overwriting_backup(self):
with tempfile.TemporaryDirectory() as directory: