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

Simplify generation of test packages used in test_check #1208

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

dnicolodi
Copy link
Contributor

These tests used build to invoke the setuptools.build_meta build backend on a package directory generated on the fly. The tests are only interested in the content of the package metadata and use variations of setup.cfg to generate the desired metadata.

This can be simplified to the direct generation of sdist archives with synthetic PKG-INFO metadata files. This makes the actual metadata the tests are checking obvious and avoid two test dependencies.

The tests simplification highlighted that two tests are actually testing the exact same thing. Remove one.

This will allow to reuse it in later commits. Change the function to
return a pathlib.Path instead of a string because that is what is used
internally and because it is easy to turn that into a string when
needed, but it is a bit more cumbersome to do the opposite.
These tests used `build` to invoke the `setuptools.build_meta` build
backend on a package directory generated on the fly. The tests are
only interested in the content of the package metadata and use
variations of `setup.cfg` to generate the desired metadata.

This can be simplified to the direct generation of sdist archives with
synthetic `PKG-INFO` metadata files. This makes the actual metadata
the tests are checking obvious and avoid two test dependencies.

The tests simplification highlighted that two tests are actually
testing the exact same thing. Remove one.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant