@@ -13,19 +13,19 @@ def test_no_license_project(
1313 tmp_path_factory : pytest .TempPathFactory ,
1414 template_root : Path ,
1515 cookiecutter_package_name : str ,
16+ cookiecutter_extra_context : dict ,
1617) -> None :
1718 """Test that projects with no-license still include an Unlicense file."""
1819 tmp_path = tmp_path_factory .mktemp ("no_license_project" )
1920
20- context = {
21+ cookiecutter_extra_context | = {
2122 "license" : "no-license" ,
22- "create_github_repo" : False ,
2323 }
2424
2525 project_path = bake (
2626 template = str (template_root ),
2727 no_input = True ,
28- extra_context = context ,
28+ extra_context = cookiecutter_extra_context ,
2929 output_dir = tmp_path ,
3030 )
3131
@@ -38,20 +38,20 @@ def test_no_pydantic_settings_project(
3838 tmp_path_factory : pytest .TempPathFactory ,
3939 template_root : Path ,
4040 cookiecutter_package_name : str ,
41+ cookiecutter_extra_context : dict ,
4142) -> None :
4243 """Test that projects without pydantic-settings don't include settings.py."""
4344 tmp_path = tmp_path_factory .mktemp ("no_pydantic_project" )
4445
45- context = {
46+ cookiecutter_extra_context | = {
4647 "use_pydantic_settings" : False ,
47- "create_github_repo" : False ,
4848 }
4949
5050 # Generate without hooks to avoid ruff issues in test templates
5151 project_path = bake (
5252 template = str (template_root ),
5353 no_input = True ,
54- extra_context = context ,
54+ extra_context = cookiecutter_extra_context ,
5555 output_dir = tmp_path ,
5656 skip_if_file_exists = True ,
5757 accept_hooks = False , # Skip hooks for this test
@@ -66,7 +66,7 @@ def test_no_pydantic_settings_project(
6666 )
6767
6868 # Check project structure (but skip .git and .venv since hooks didn't run)
69- basic_context = context .copy ()
69+ basic_context = cookiecutter_extra_context .copy ()
7070 basic_context ["_hooks_ran" ] = False
7171 assert check_project_contents (
7272 project_path , cookiecutter_package_name , basic_context
0 commit comments