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-2.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d904b724d91f38f21822f2a6dc3b3068919b96842f4d8306e961192e6590fb86 |
|
MD5 | d5192798d661a0ff007c2aff3ae2bb57 |
|
BLAKE2b-256 | f2d7692c03a98977629d3e951077879260a25d8b38d53d87afd9b9483c9998f7 |