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.0.0.tar.gz (15.7 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: cli-test-helpers-2.0.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.0.0.tar.gz
Algorithm Hash digest
SHA256 494d69879fd783cc14b1c24240d33cd7e8b885a5a96fffed05e8b232c6b53db0
MD5 982a30e05a82b02b2fdb88e154c44b97
BLAKE2b-256 9df1de3c80c7a3996f76fde639f314ae784dcc5a6a63e82bf0a5862ac57a81df

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cli_test_helpers-2.0.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.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a50222daf5650fde69c1287b6062fcf887e77bf082cb7dd6f629046201080a07
MD5 89532170c5cf805dd5f07103e960d171
BLAKE2b-256 e16963298b93b731a57d16b1157473de6c53da815c92e1b57e0aeabfc231355c

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