Skip to content

Commit

Permalink
Add a tests for different package / module name
Browse files Browse the repository at this point in the history
  • Loading branch information
Cadair committed Dec 18, 2024
1 parent 51d47b9 commit 95b39f1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ def bake_examples(cookies):
"""
Examples on.
"""
result = cookies.bake(extra_context={"include_example_code": "y",
result = cookies.bake(extra_context={"package_name": "example-package",
"module_name": "example_package",
"include_example_code": "y",
"author_name": "test",
"use_extended_ruff_linting": "y"})
return _handle_cookiecutter_errors(result)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def test_examples_present(cookiejar_examples):
example_files.append("example_c.pyx")

for afile in example_files:
assert (cj.project_path / ctx['package_name'] / afile).exists()
assert (cj.project_path / ctx['module_name'] / afile).exists()


@pytest.mark.parametrize("license, lfile", [
Expand Down

0 comments on commit 95b39f1

Please sign in to comment.