New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cli-test-helpers

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cli-test-helpers

Useful helpers for writing tests for your Python CLI program.

  • 4.1.0
  • PyPI
  • Socket score

Maintainers
1

cli-test-helpers |latest-version|

|check-status| |test-status| |publish-status| |python-support| |license| |docs-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.

.. |latest-version| image:: https://img.shields.io/pypi/v/cli-test-helpers.svg :target: https://pypi.org/project/cli-test-helpers :alt: Latest version on PyPI .. |check-status| image:: https://github.com/painless-software/python-cli-test-helpers/actions/workflows/check.yml/badge.svg :target: https://github.com/painless-software/python-cli-test-helpers/actions/workflows/check.yml :alt: Code checks status .. |test-status| image:: https://github.com/painless-software/python-cli-test-helpers/actions/workflows/test.yml/badge.svg :target: https://github.com/painless-software/python-cli-test-helpers/actions/workflows/test.yml :alt: Test suite status .. |publish-status| image:: https://github.com/painless-software/python-cli-test-helpers/actions/workflows/publish.yml/badge.svg :target: https://github.com/painless-software/python-cli-test-helpers/actions/workflows/publish.yml :alt: Latest release Status .. |python-support| image:: https://img.shields.io/pypi/pyversions/cli-test-helpers.svg :target: https://pypi.org/project/cli-test-helpers :alt: Python versions .. |license| image:: https://img.shields.io/pypi/l/cli-test-helpers.svg :target: https://github.com/painless-software/python-cli-test-helpers/blob/main/LICENSE :alt: Software license .. |docs-status| image:: https://img.shields.io/readthedocs/python-cli-test-helpers/latest.svg :target: https://readthedocs.org/projects/python-cli-test-helpers/ :alt: Documentation Status .. _more difficult than it seems at first sight: https://stackoverflow.com/questions/13493288/ .. _argparse: https://docs.python.org/3/library/argparse.html .. _click: https://click.palletsprojects.com/ .. _docopt: http://docopt.org/ .. _documentation: https://python-cli-test-helpers.readthedocs.io/ .. _CLI Copier template: https://gitlab.com/painless-software/cicd/app/cli .. _CONTRIBUTING: https://github.com/painless-software/python-cli-test-helpers/blob/main/CONTRIBUTING.rst

.. links-marker

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_.

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc