Skip to main content

Useful helpers for writing tests for your Python CLI program.

Project description

Code checks status Test suite status Python versions Software license Documentation Status

Useful helpers for writing tests for your Python CLI program.

Writing tests for a command line interface (CLI) tool may not seem strictly straight-forward when you think in terms of unit tests. Especially, when you use the argparse module or the click package, control of the application entry point is a bit taken away from you.

But it’s not all that bad. This package is here to help. The examples give you some guidance on how to get started, and the helpers allow you to deal with common cases, such as mocking CLI arguments and environment variable values.

Documentation

See the documentation for installation instructions and a tutorial.

Examples

The examples folder contains a hands-on example you can directly start to use.

Download files

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

Source Distribution

cli-test-helpers-3.0.0.tar.gz (16.2 kB view details)

Uploaded Source

Built Distribution

cli_test_helpers-3.0.0-py3-none-any.whl (16.3 kB view details)

Uploaded Python 3

File details

Details for the file cli-test-helpers-3.0.0.tar.gz.

File metadata

  • Download URL: cli-test-helpers-3.0.0.tar.gz
  • Upload date:
  • Size: 16.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.12

File hashes

Hashes for cli-test-helpers-3.0.0.tar.gz
Algorithm Hash digest
SHA256 c2498fc821cbf127e19e0ccf2cc7aeae293a8a642d57038cbc0f9320d626abe1
MD5 6c3e280f2d7e155782c397602cd88f63
BLAKE2b-256 d385a77c9340f4189b34c9596988c1a2823e816d6ca002c2dc4f7c5d971a4236

See more details on using hashes here.

Provenance

File details

Details for the file cli_test_helpers-3.0.0-py3-none-any.whl.

File metadata

  • Download URL: cli_test_helpers-3.0.0-py3-none-any.whl
  • Upload date:
  • Size: 16.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.12

File hashes

Hashes for cli_test_helpers-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cbbe36a56e83f272b8f5541b93849b4f2966c0ce86c3820103b4ac31a81c9c4d
MD5 1c835091747c6c1e7a3d95e0d71e19c8
BLAKE2b-256 f0d47de0e1d2a5a56a76a0d39af5ad4932a569ac5b6132c06622a5c90ea8a923

See more details on using hashes here.

Provenance

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