Skip to main content

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:

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)

Source distribution for pytest-import-check 0.0.4
File Size Uploaded
pytest_import_check-0.0.4.tar.gz 17.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pytest-import-check 0.0.4
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

0.0.4 This release

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page