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
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 | |
|---|---|---|---|
| pytest_import_check-0.0.4.tar.gz | 17.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pytest_import_check-0.0.4-py3-none-any.whl | Python 3 | none | any | Details |
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
|