pytest plugin to check whether Python modules can be imported
Project description
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
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pytest_import_check-0.0.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b4fae8e7b862ed8bf69d31dd85e472a0800c37a04d19c62d848d67e50e52e4a |
|
MD5 | 3261bb2f565c5b30a039df9044eca4f1 |
|
BLAKE2b-256 | 6a484ae61c0f606ed2f94c1bb9717a91fa4c266b97736dcfe41b6c84ce09622f |
Hashes for pytest_import_check-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 08ca2716464fc11177c974b1d5fc7b1bcb4480470cc3fdab6eb3ca8832e29fd1 |
|
MD5 | f55accc93ab17714b3eac5e9cc5103bf |
|
BLAKE2b-256 | 2456ee6a65b8a44e54e6d683db2ef7e4b5ed65cb959eb15222cf64659c6471f4 |