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) 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
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
Hashes for cli_test_helpers-3.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 26be2d55095a432a41a437e7209fc238ef00f02a3b2c307ac3e56bb61f7a3473 |
|
MD5 | 41bda463c6ed4649e1c3ff81c99bc0aa |
|
BLAKE2b-256 | d3b51aa5136c65165a629cf4374fb33d0138566a7928e307b511ce5bbae6b519 |