MCPcopy Index your code
hub / github.com/github/spec-kit / test_list_installed

Method test_list_installed

tests/test_extensions.py:1516–1533  ·  view source on GitHub ↗

Test listing installed extensions.

(self, extension_dir, project_dir)

Source from the content-addressed store, hash-verified

1514 assert result is False
1515
1516 def test_list_installed(self, extension_dir, project_dir):
1517 """Test listing installed extensions."""
1518 manager = ExtensionManager(project_dir)
1519
1520 # Initially empty
1521 assert len(manager.list_installed()) == 0
1522
1523 # Install extension
1524 manager.install_from_directory(extension_dir, "0.1.0", register_commands=False)
1525
1526 # Should have one extension
1527 installed = manager.list_installed()
1528 assert len(installed) == 1
1529 assert installed[0]["id"] == "test-ext"
1530 assert installed[0]["name"] == "Test Extension"
1531 assert installed[0]["version"] == "1.0.0"
1532 assert installed[0]["command_count"] == 1
1533 assert installed[0]["hook_count"] == 1
1534
1535 def test_config_backup_on_remove(self, extension_dir, project_dir):
1536 """Test that config files are backed up on removal."""

Callers

nothing calls this directly

Calls 3

list_installedMethod · 0.95
ExtensionManagerClass · 0.90

Tested by

no test coverage detected