Skip to content

Commit d4cbdb1

Browse files
committed
fix: fix docstring backticks, assert file modification in upgrade tests
1 parent d636aaa commit d4cbdb1

2 files changed

Lines changed: 11 additions & 11 deletions

File tree

src/specify_cli/integrations/catalog.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ def get_active_catalogs(self) -> List[IntegrationCatalogEntry]:
169169
170170
Resolution:
171171
1. ``SPECKIT_INTEGRATION_CATALOG_URL`` env var
172-
2. Project ```.specify/integration-catalogs.yml```
172+
2. Project ``.specify/integration-catalogs.yml``
173173
3. User ``~/.specify/integration-catalogs.yml``
174174
4. Built-in defaults (built-in + community)
175175
"""

tests/integrations/test_integration_catalog.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -563,11 +563,11 @@ def test_upgrade_blocks_on_modified_files(self, tmp_path):
563563
assert manifest_path.exists(), "Manifest should exist after init"
564564
manifest_data = json.loads(manifest_path.read_text())
565565
tracked_files = manifest_data.get("files", {})
566-
if tracked_files:
567-
first_rel = next(iter(tracked_files))
568-
target_file = project / first_rel
569-
if target_file.exists():
570-
target_file.write_text("MODIFIED CONTENT\n")
566+
assert tracked_files, "Manifest should track at least one file"
567+
first_rel = next(iter(tracked_files))
568+
target_file = project / first_rel
569+
assert target_file.exists(), f"Tracked file {first_rel} should exist"
570+
target_file.write_text("MODIFIED CONTENT\n")
571571

572572
old = os.getcwd()
573573
try:
@@ -588,11 +588,11 @@ def test_upgrade_force_overwrites_modified(self, tmp_path):
588588
manifest_path = project / ".specify" / "integrations" / "copilot.manifest.json"
589589
manifest_data = json.loads(manifest_path.read_text())
590590
tracked_files = manifest_data.get("files", {})
591-
if tracked_files:
592-
first_rel = next(iter(tracked_files))
593-
target_file = project / first_rel
594-
if target_file.exists():
595-
target_file.write_text("MODIFIED CONTENT\n")
591+
assert tracked_files, "Manifest should track at least one file"
592+
first_rel = next(iter(tracked_files))
593+
target_file = project / first_rel
594+
assert target_file.exists(), f"Tracked file {first_rel} should exist"
595+
target_file.write_text("MODIFIED CONTENT\n")
596596

597597
old = os.getcwd()
598598
try:

0 commit comments

Comments
 (0)