Skip to main content

Simple import test for Python packages

Project description

This library implements a set of simple verification tests for an installed Python distribution, or an installed Python module.


Verify installation of a Python distribution

To verify correct installation of a Python distribution named lorem:

$ python3 -m package_smoke_test --distribution lorem
Interpreter: /usr/bin/python3
        3.11.4 (main, Jun  7 2023, 10:13:09) [GCC 12.2.0]
Distribution ‘lorem’:
        Lorem Ipsum 2.7.3

Verify installation of Python packages or modules

To verify correct installation of a set of Python packages or modules, named dolor, sit, and amet:

$ python3 -m package_smoke_test --module dolor sit amet
Interpreter: /usr/bin/python3
        3.11.4 (main, Jun  7 2023, 10:13:09) [GCC 12.2.0]
Package ‘dolor’:
        <module 'dolor' from '/usr/lib/python3/dist-packages/lorem/dolor/'>
Package ‘sit’:
        <module 'sit' from '/usr/lib/python3/dist-packages/lorem/sit/'>
Package ‘amet’:
        <module 'amet' from '/usr/lib/python3/dist-packages/lorem/amet/'>

Example script for post-installation test

The file doc/examples/smoke-test-python3 is a Bash script that you can customise for your package, to run the above tests.


This work, ‘python-package-smoke-test’, is free software: you may copy, modify, and/or distribute this work under the conditions of the GNU General Public License as published by the Free Software Foundation; version 3 of that license or any later version. See the file ‘LICENSE.GPL-3’ for details. No warranty expressed or implied.

Project details

Release history Release notifications | RSS feed

This version


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

package-smoke-test-1.0.tar.gz (16.4 kB view hashes)

Uploaded Source

Built Distribution

package_smoke_test-1.0-py3-none-any.whl (16.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page