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.

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

cli-test-helpers-2.1.0.tar.gz (15.7 kB view details)

Uploaded Source

Built Distribution

cli_test_helpers-2.1.0-py3-none-any.whl (16.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cli-test-helpers-2.1.0.tar.gz
  • Upload date:
  • Size: 15.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

File hashes

Hashes for cli-test-helpers-2.1.0.tar.gz
Algorithm Hash digest
SHA256 341667f3936ddf825dffe6155e9dffa07b09770fb73305cd43589cc6b42e8d75
MD5 667d1d74d9afe373e3612f9de29d18b1
BLAKE2b-256 03962a00e9c61b1fa7c68d6b7c89d8d2ec653f59fde529a6016c6155024ea216

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cli_test_helpers-2.1.0-py3-none-any.whl
  • Upload date:
  • Size: 16.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

File hashes

Hashes for cli_test_helpers-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d904b724d91f38f21822f2a6dc3b3068919b96842f4d8306e961192e6590fb86
MD5 d5192798d661a0ff007c2aff3ae2bb57
BLAKE2b-256 f2d7692c03a98977629d3e951077879260a25d8b38d53d87afd9b9483c9998f7

See more details on using hashes here.

Supported by

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