Test clearing catalog cache.
(self, temp_dir)
| 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 |
nothing calls this directly
no test coverage detected