feat: add self-update and improve skill selector
This commit is contained in:
@@ -7,6 +7,9 @@ import sys
|
||||
import tempfile
|
||||
import unittest
|
||||
from pathlib import Path
|
||||
from unittest.mock import patch
|
||||
|
||||
from skiff.registry import external_checkout_path, registry_repo
|
||||
|
||||
|
||||
REPO_ROOT = Path(__file__).resolve().parents[1]
|
||||
@@ -79,6 +82,17 @@ class RegistryCollectionTests(unittest.TestCase):
|
||||
check=False,
|
||||
)
|
||||
|
||||
def test_registry_repo_expands_home_relative_local_path(self) -> None:
|
||||
with patch.dict(os.environ, {"HOME": str(self.home)}):
|
||||
self.assertEqual(
|
||||
registry_repo({"repo": "~/.skills"}),
|
||||
str(self.skills_home),
|
||||
)
|
||||
self.assertEqual(
|
||||
external_checkout_path("skills", {"repo": "~/.skills"}),
|
||||
self.skills_home.resolve(),
|
||||
)
|
||||
|
||||
def test_add_collection_installs_every_discovered_skill(self) -> None:
|
||||
result = self.run_skiff("add", "test-pack", "-g", "-a", "codex")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user