Repository navigation
Simplify test_package_generation. - #650
samcunliffe wants to merge 1 commit into
Conversation
And remove the regression test + regression data.
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The focused assertions match fixture defaults, installation and documentation-build tests remain intact, and static review identified no blocking issues.
Review effort: Balanced
Findings: None
What changed in this PR
Simplifies Cookiecutter generation testing by replacing full snapshot comparisons with focused checks, removing duplicated generated-project data.
Changes:
- Checks generation success, required files, and selected rendered values.
- Removes snapshot comparison and automatic fixture replacement.
- Deletes the stored reference project.
| File | Description |
|---|---|
| tests/test_package_generation.py | Replaces snapshot comparison with focused assertions. |
| tests/data/test_package_generation/tests/test_dummy.py | Removes reference test. |
| tests/data/test_package_generation/src/cookiecutter_test/__init__.py | Removes reference package source. |
| tests/data/test_package_generation/README.md | Removes reference README. |
| tests/data/test_package_generation/pyproject.toml | Removes reference project configuration. |
| tests/data/test_package_generation/mkdocs.yml | Removes reference documentation configuration. |
| tests/data/test_package_generation/LICENSE.md | Removes reference license. |
| tests/data/test_package_generation/docs/LICENSE.md | Removes reference license page. |
| tests/data/test_package_generation/docs/index.md | Removes reference overview page. |
| tests/data/test_package_generation/docs/api.md | Removes reference API page. |
| tests/data/test_package_generation/CITATION.cff | Removes reference citation metadata. |
| tests/data/test_package_generation/.pre-commit-config.yaml | Removes reference hook configuration. |
| tests/data/test_package_generation/.markdownlint.yaml | Removes reference Markdown lint configuration. |
| tests/data/test_package_generation/.gitignore | Removes reference ignore rules. |
| tests/data/test_package_generation/.github/workflows/tests.yml | Removes reference test workflow. |
| tests/data/test_package_generation/.github/workflows/linting.yml | Removes reference lint workflow. |
| tests/data/test_package_generation/.github/workflows/docs.yml | Removes reference documentation workflow. |
| tests/data/test_package_generation/.github/schemas/github-issue-forms.json | Removes reference issue-form schema. |
| tests/data/test_package_generation/.github/ISSUE_TEMPLATE/question.yml | Removes reference question form. |
| tests/data/test_package_generation/.github/ISSUE_TEMPLATE/feature_request.yml | Removes reference feature-request form. |
| tests/data/test_package_generation/.github/ISSUE_TEMPLATE/documentation.yml | Removes reference documentation form. |
| tests/data/test_package_generation/.github/ISSUE_TEMPLATE/config.yml | Removes reference issue configuration. |
| tests/data/test_package_generation/.github/ISSUE_TEMPLATE/bug_report.yml | Removes reference bug-report form. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
paddyroddy
left a comment
There was a problem hiding this comment.
Code looks fine, but this is not as thorough as before. Maybe this isn't a problem, but previously we were checking every file.
Right. I guess that's my proposal. We want to ensure that the template generation works (the most important thing) and for that we don't need every single file to regress against. To my knowledge we've never caught a bug with the regression test that wouldn't have been caught with a simpler thing like this. |
|
So it looks like the initial intent was because there was a mismatch in |
I think a check that the |
|
I like that idea |
I would very much like to get rid of the complete duplication of the
{{cookiecutter.project_slug}}directory.This proposal massively simplifies
test_package_generationand removes the regression data.