Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some regression tests on generated package files #329

Open
dstansby opened this issue Mar 25, 2024 · 0 comments · May be fixed by #432
Open

Add some regression tests on generated package files #329

dstansby opened this issue Mar 25, 2024 · 0 comments · May be fixed by #432
Assignees
Labels
enhancement New feature or request

Comments

@dstansby
Copy link
Member

Is Your Feature Request Related to a Problem? Please Describe

We don't currently have any regression tests for the files that are generated by the package template. As an example of where this would have been useful, see #309. I made a mistake that broke a couple of the pyproject.toml fields, that would have been more easily spotted if there was a test that compared pyproject.toml against a reference/expected file.

Describe the Solution You'd Like

Add a test that compares pyproject.toml to an expected/reference file, which fails if the generated file doesn't match. I would suggest starting with just pyprojec.toml to pin down the testing machinery, and then rolling out to other files in a follow up PR.

Describe Alternatives You've Considered

No response

Additional Context

No response

@dstansby dstansby added the enhancement New feature or request label Mar 25, 2024
dstansby added a commit that referenced this issue Jul 22, 2024
As a first step towards
#329, this improves the
testing of the generated package files by generating a list of all
files/folders in the generated package, and comparing that to an
expected list.

This is an improvement over the previous test, where we only checked
that several explicit files/folders exist. The new test will now catch
cases where we add extra files/folders that aren't expected.

---------

Co-authored-by: Sam Cunliffe <[email protected]>
@dstansby dstansby linked a pull request Jul 24, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants