Useful helpers for writing tests for your Python CLI program.
Project description
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file cli_test_helpers-4.1.0.tar.gz
.
File metadata
- Download URL: cli_test_helpers-4.1.0.tar.gz
- Upload date:
- Size: 49.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 317a642087f2b86d04ffa279200492d186d103284d082ff20a0287223409351e |
|
MD5 | 9595dbbe32b68f337dd288826804866c |
|
BLAKE2b-256 | 14eac389552b72ae8a6415c5df0e54afe008b6a66272c919db718e5ee2dd86bd |
File details
Details for the file cli_test_helpers-4.1.0-py3-none-any.whl
.
File metadata
- Download URL: cli_test_helpers-4.1.0-py3-none-any.whl
- Upload date:
- Size: 35.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a5308842e929e2c70dbb446be1b05f235dd09a896256bbb0bac7bdd89bae88e |
|
MD5 | 00a1ff879647a3d02bea8928e5378654 |
|
BLAKE2b-256 | b113084afd8429bd56dfc273736df2dab6d34518c0d00134eb1d456e30ca4763 |