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

Method test_remove_extension

tests/test_extensions.py:1492–1507  ·  view source on GitHub ↗

Test removing an installed extension.

(self, extension_dir, project_dir)

Source from the content-addressed store, hash-verified

1490 manager.install_from_directory(second_dir, "0.1.0", register_commands=False)
1491
1492 def test_remove_extension(self, extension_dir, project_dir):
1493 """Test removing an installed extension."""
1494 manager = ExtensionManager(project_dir)
1495
1496 # Install extension
1497 manager.install_from_directory(extension_dir, "0.1.0", register_commands=False)
1498
1499 ext_dir = project_dir / ".specify" / "extensions" / "test-ext"
1500 assert ext_dir.exists()
1501
1502 # Remove extension
1503 result = manager.remove("test-ext", keep_config=False)
1504
1505 assert result is True
1506 assert not manager.registry.is_installed("test-ext")
1507 assert not ext_dir.exists()
1508
1509 def test_remove_nonexistent(self, project_dir):
1510 """Test removing non-existent extension."""

Callers

nothing calls this directly

Calls 4

removeMethod · 0.95
ExtensionManagerClass · 0.90
is_installedMethod · 0.45

Tested by

no test coverage detected