Skip to main content

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.

Release files for cli-test-helpers 4.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cli-test-helpers 4.2.0
File Size Uploaded
cli_test_helpers-4.2.0.tar.gz 51.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cli-test-helpers 4.2.0
File Interpreter ABI Platform
cli_test_helpers-4.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 86.7 kB

Release files / cli_test_helpers-4.2.0.tar.gz

Download URL cli_test_helpers-4.2.0.tar.gz
Size 51.0 kB
Tags Source
SHA-256 checksum
How to use checksums
c7dc8f26a1ca30ff63d75ef2f259ec7044e1c4a78dede204627e069861257b06
BLAKE2b-256 checksum
How to use checksums
217fe75d5401607fe7ecbdb61f2834c938188d5701625006851214063ae9d59b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11

Release files / cli_test_helpers-4.2.0-py3-none-any.whl

Download URL cli_test_helpers-4.2.0-py3-none-any.whl
Size 35.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6b644e0abc3e9a22fae9765cde96a525ca317f7e296a5f25ff1dcfebfec1119a
BLAKE2b-256 checksum
How to use checksums
024b3d6ef5cfb906b2e53b8af97023ac17d103b9ba1a795587d3a2b6ad9a8e1e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11

Release history Release notifications | RSS feed

This release

4.2.0 This release

2 release files

4.1.0

2 release files

4.0.0

2 release files

3.5.0

2 release files

3.4.0

2 release files

3.3.0

2 release files

3.2.0

2 release files

3.1.0

2 release files

3.0.0

2 release files

2.1.0

2 release files

2.0.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page