@@ -152,7 +152,7 @@ def test_python_mkdocs_only(tmp_path: Path) -> None:
152152 # Check that postCreateCommand.sh contains the expected Python setup commands
153153 assert_file_contains (dest , ".devcontainer/postCreateCommand.sh" , "curl -LsSf https://astral.sh/uv/install.sh | sh" )
154154 assert_file_contains (dest , ".devcontainer/postCreateCommand.sh" , "uv sync --group dev" )
155- assert_file_contains (dest , ".devcontainer/postCreateCommand.sh" , "uv run pre-commit install --install-hooks" )
155+ assert_file_contains (dest , ".devcontainer/postCreateCommand.sh" , "prek install --install-hooks" )
156156 # Check that Justfile contains documentation commands (python_package boolean bug)
157157 assert_file_contains (dest , "Justfile" , "# 📚 DOCUMENTATION" )
158158 assert_file_contains (dest , "Justfile" , "docs:" )
@@ -181,26 +181,24 @@ def test_python_data_science_notebooks(tmp_path: Path) -> None:
181181 },
182182 )
183183 assert res .returncode == 0 , res .stderr
184- assert_exists (
185- dest , "notebooks" , "pyproject.toml" , "tox.ini" , "pydata_proj" , "tests" , ".github" , ".devcontainer"
186- )
184+ assert_exists (dest , "notebooks" , "pyproject.toml" , "tox.ini" , "pydata_proj" , "tests" , ".github" , ".devcontainer" )
187185 assert_missing (dest , "docs" , "mkdocs.yml" )
188186 # Check that py_example.qmd contains actual content (not template condition)
189- assert_file_contains (dest , "notebooks/py_example.qmd" , " title: \ " Python Data Analysis Example\" " )
187+ assert_file_contains (dest , "notebooks/py_example.qmd" , ' title: "Python Data Analysis Example"' )
190188 assert_file_contains (dest , "notebooks/py_example.qmd" , "import polars as pl" )
191189 # Ensure template condition is not present in final output
192190 content = (dest / "notebooks/py_example.qmd" ).read_text ()
193- assert " {% if cookiecutter.pydata == \" y \ " %}" not in content , "Template condition should be resolved"
191+ assert ' {% if cookiecutter.pydata == "y " %}' not in content , "Template condition should be resolved"
194192
195193
196- def test_directory_name_in_devcontainer (tmp_path : Path ) -> None :
194+ def test_project_name_in_devcontainer (tmp_path : Path ) -> None :
197195 dest = tmp_path / "my_custom_dir"
198196 res = run_copier (
199197 Path (__file__ ).parents [1 ],
200198 dest ,
201199 {
202200 "author" : "Test" ,
203- 201+ 204202 "author_github_handle" : "test" ,
205203 "project_name" : "different-name" , # This is different from directory name
206204 "project_features" : "[python_package]" ,
@@ -210,8 +208,8 @@ def test_directory_name_in_devcontainer(tmp_path: Path) -> None:
210208 },
211209 )
212210 assert res .returncode == 0 , res .stderr
213- # Check that devcontainer uses actual directory name, not project_name
214- assert_file_contains (dest , ".devcontainer/devcontainer.json" , "/workspaces/my_custom_dir/.venv/bin/python " )
215- # Should NOT contain the project_name in paths
211+ # Check that devcontainer uses project name, not directory name
212+ assert_file_contains (dest , ".devcontainer/devcontainer.json" , "/workspaces/different-name " )
213+ # Should NOT contain the directory name in paths
216214 content = (dest / ".devcontainer/devcontainer.json" ).read_text ()
217- assert "/workspaces/different-name /" not in content
215+ assert "/workspaces/my_custom_dir /" not in content
0 commit comments