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

Method test_clear_cache

tests/test_extensions.py:3256–3276  ·  view source on GitHub ↗

Test clearing catalog cache.

(self, temp_dir)

Source from the content-addressed store, hash-verified

3254 assert info is None
3255
3256 def test_clear_cache(self, temp_dir):
3257 """Test clearing catalog cache."""
3258 project_dir = temp_dir / "project"
3259 project_dir.mkdir()
3260 (project_dir / ".specify").mkdir()
3261
3262 catalog = ExtensionCatalog(project_dir)
3263
3264 # Create cache
3265 catalog.cache_dir.mkdir(parents=True, exist_ok=True)
3266 catalog.cache_file.write_text("{}")
3267 catalog.cache_metadata_file.write_text("{}")
3268
3269 assert catalog.cache_file.exists()
3270 assert catalog.cache_metadata_file.exists()
3271
3272 # Clear cache
3273 catalog.clear_cache()
3274
3275 assert not catalog.cache_file.exists()
3276 assert not catalog.cache_metadata_file.exists()
3277
3278 # --- _make_request / GitHub auth ---
3279

Callers

nothing calls this directly

Calls 2

clear_cacheMethod · 0.95
ExtensionCatalogClass · 0.90

Tested by

no test coverage detected