Skip to main content

Useful helpers for writing tests for your Python CLI program.

Project description

Code checks status Test suite status Latest release Status Monthly downloads from PyPI Python versions Software license Documentation Status

Useful helpers for writing tests for your Python CLI program.

Writing tests for a command line interface (CLI) application is more difficult than it seems at first sight. Especially, when you use the argparse module or the docopt or 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 Painless Software CLI Copier template offers some guidance on how to get started, and the CLI test 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 / Quickstart

Visit the Painless Software CLI Copier template to inspect hands-on CLI application blueprints for the most popular CLI frameworks. The Copier tool lets you create your own CLI application project with tests and modern CI/CD, effortlessly.

Development

See CONTRIBUTING.

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

Uploaded Source

Built Distribution

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

cli_test_helpers-4.2.0-py3-none-any.whl (35.7 kB view details)

Uploaded Python 3

File details

Details for the file cli_test_helpers-4.2.0.tar.gz.

File metadata

  • Download URL: cli_test_helpers-4.2.0.tar.gz
  • Upload date:
  • Size: 51.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for cli_test_helpers-4.2.0.tar.gz
Algorithm Hash digest
SHA256 c7dc8f26a1ca30ff63d75ef2f259ec7044e1c4a78dede204627e069861257b06
MD5 ba939da767ddf5d0b39298e979eed6d0
BLAKE2b-256 217fe75d5401607fe7ecbdb61f2834c938188d5701625006851214063ae9d59b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cli_test_helpers-4.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6b644e0abc3e9a22fae9765cde96a525ca317f7e296a5f25ff1dcfebfec1119a
MD5 d6c0802abc957657c0920e84550851c9
BLAKE2b-256 024b3d6ef5cfb906b2e53b8af97023ac17d103b9ba1a795587d3a2b6ad9a8e1e

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