pytest-import-check
Description
pytest-import-check is a pytest plugin that enables checking whether Python modules installed by your package are importable. This is mostly useful to quickly check packages that do not have tests at all or do not have all their modules covered by tests.
To enable it, pass --import-check option to pytest, e.g.:
pytest --import-check foo
Please note that pytest will still perform the default collection and run any tests that it can find. Note that this may result in quite verbose tracebacks. If this is undesirable, you can disable the built-in python plugin:
pytest -p no:python --import-check foo
Thanks
While writing this plugin, I’ve looked at the following linter plugins for inspiration on how to use the API:
pytest-flakes by Florian Schulze, Holger Krekel and Ronny Pfannschmidt
pytest-mypy by Daniel Bader
Metadata
Release files for pytest-import-check 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pytest_import_check-0.0.4.tar.gz | 17.2 kB | Without provenance | Details for pytest_import_check-0.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pytest_import_check-0.0.4-py3-none-any.whl | Python 3 | none | any | Details for pytest_import_check-0.0.4-py3-none-any.whl |
Total release size: 32.9 kB
Release files / pytest_import_check-0.0.4.tar.gz
| Download URL | pytest_import_check-0.0.4.tar.gz |
|---|---|
| Size | 17.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7b4fae8e7b862ed8bf69d31dd85e472a0800c37a04d19c62d848d67e50e52e4a
|
|
BLAKE2b-256 checksum How to use checksums |
6a484ae61c0f606ed2f94c1bb9717a91fa4c266b97736dcfe41b6c84ce09622f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.4
|
Release files / pytest_import_check-0.0.4-py3-none-any.whl
| Download URL | pytest_import_check-0.0.4-py3-none-any.whl |
|---|---|
| Size | 15.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
08ca2716464fc11177c974b1d5fc7b1bcb4480470cc3fdab6eb3ca8832e29fd1
|
|
BLAKE2b-256 checksum How to use checksums |
2456ee6a65b8a44e54e6d683db2ef7e4b5ed65cb959eb15222cf64659c6471f4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.4
|
Security for pytest-import-check 0.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.