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.

Examples

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/__init__.py'>
Package ‘sit’:
        <module 'sit' from '/usr/lib/python3/dist-packages/lorem/sit/__init__.py'>
Package ‘amet’:
        <module 'amet' from '/usr/lib/python3/dist-packages/lorem/amet/__init__.py'>

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.

Copying

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

1.0

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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

Details for the file package-smoke-test-1.0.tar.gz.

File metadata

  • Download URL: package-smoke-test-1.0.tar.gz
  • Upload date:
  • Size: 16.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for package-smoke-test-1.0.tar.gz
Algorithm Hash digest
SHA256 0f277137411fc7df64b3c674746ba828fdcf64b31bd98b7d34db8780e9d56291
MD5 f630faf8b15694d6de8e4939b848a20a
BLAKE2b-256 1822aadc108248bd0432b2726d41729e8df177064546ee71a3546bd4eb891b2e

See more details on using hashes here.

File details

Details for the file package_smoke_test-1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for package_smoke_test-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 34cb6f4c7bd4d6db9dfc78460154dbed9c2632d3eb6c510bd6a56cebb3529652
MD5 6764737747c2fa950a8ff257802eace6
BLAKE2b-256 b5a6802f342678ff190e1999dec9ebe4d1e18cababe9e685d52ddd196c9bfe8b

See more details on using hashes here.

Supported by

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