Skip to content
This repository was archived by the owner on Apr 7, 2026. It is now read-only.

Commit 125aa6c

Browse files
committed
fix: Fix test paths to use correct template directory structure
- Fix test_required_template_files to use correct source directory path - Fix test_cli_options_consistency to use correct CLI template path - Change from src/{{cookiecutter.project_slug}} to src/{{cookiecutter.project_slug.replace('-', '_')}} - Tests now correctly locate template files in the actual directory structure - Resolves CI failures on Ubuntu where tests couldn't find template files
1 parent c46ee6e commit 125aa6c

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

tests/test_template.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,10 @@ def test_required_template_files(self, template_dir: Path) -> None:
142142
"README.md",
143143
"LICENSE",
144144
".gitignore",
145-
"src/{{cookiecutter.project_slug}}/__init__.py",
146-
"src/{{cookiecutter.project_slug}}/core.py",
147-
"src/{{cookiecutter.project_slug}}/cli.py",
148-
"src/{{cookiecutter.project_slug}}/py.typed",
145+
"src/{{cookiecutter.project_slug.replace('-', '_')}}/__init__.py",
146+
"src/{{cookiecutter.project_slug.replace('-', '_')}}/core.py",
147+
"src/{{cookiecutter.project_slug.replace('-', '_')}}/cli.py",
148+
"src/{{cookiecutter.project_slug.replace('-', '_')}}/py.typed",
149149
"tests/__init__.py",
150150
"tests/test_core.py",
151151
"tests/test_cli.py",

tests/test_validation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def test_cli_options_consistency(self) -> None:
138138
template_dir
139139
/ "{{cookiecutter.project_slug}}"
140140
/ "src"
141-
/ "{{cookiecutter.project_slug}}"
141+
/ "{{cookiecutter.project_slug.replace('-', '_')}}"
142142
/ "cli.py"
143143
)
144144

0 commit comments

Comments
 (0)