Skip to content

Commit 4bde2cd

Browse files
committed
Updated test suite
Claude added an unlicense file for no-license, which was not intended. no-license now means no license. Tests updated.
1 parent bd7b5f8 commit 4bde2cd

9 files changed

+457
-371
lines changed

tests/conftest.py

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -38,37 +38,39 @@
3838
def generate_expected_manifest(cookiecutter_context: dict) -> list[tuple[str, str]]:
3939
"""Generate expected file manifest based on cookiecutter context."""
4040
manifest = []
41-
41+
4242
# Files created by hooks
4343
hook_files = {".git", ".venv", "uv.lock"}
44-
44+
4545
# Add base files that don't depend on hooks
4646
for test_type, path in BASE_MANIFEST:
4747
if path not in hook_files:
4848
manifest.append((test_type, path))
49-
50-
# LICENSE file is always included (even for no-license, it's an Unlicense)
51-
manifest.append(("is_file", "LICENSE"))
52-
49+
50+
if cookiecutter_context.get("license", "no-license") != "no-license":
51+
manifest.append(("is_file", "LICENSE"))
52+
5353
# Add files created by hooks if we expect them to have run
5454
if cookiecutter_context.get("_hooks_ran", True):
55-
manifest.extend([
56-
("is_dir", ".git"),
57-
("is_dir", ".venv"),
58-
("is_file", "uv.lock"),
59-
])
60-
55+
manifest.extend(
56+
[
57+
("is_dir", ".git"),
58+
("is_dir", ".venv"),
59+
("is_file", "uv.lock"),
60+
]
61+
)
62+
6163
return manifest
6264

6365

6466
def generate_expected_src_files(cookiecutter_context: dict) -> list[str]:
6567
"""Generate expected source files based on cookiecutter context."""
6668
src_files = BASE_SRC.copy()
67-
69+
6870
# Add settings.py if pydantic-settings is enabled
6971
if cookiecutter_context.get("use_pydantic_settings", True):
7072
src_files.append("settings.py")
71-
73+
7274
return src_files
7375

7476

0 commit comments

Comments
 (0)