https://github.com/pytest-with-eric/pytest-argument-testing-example
How To Test CLI Applications With Pytest, Argparse And Typer
https://github.com/pytest-with-eric/pytest-argument-testing-example
argparse cli-testing pytest-argparse pytest-typer typer
Last synced: 9 months ago
JSON representation
How To Test CLI Applications With Pytest, Argparse And Typer
- Host: GitHub
- URL: https://github.com/pytest-with-eric/pytest-argument-testing-example
- Owner: Pytest-with-Eric
- Created: 2024-02-05T17:18:48.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-26T07:17:13.000Z (almost 2 years ago)
- Last Synced: 2025-01-29T12:29:48.315Z (11 months ago)
- Topics: argparse, cli-testing, pytest-argparse, pytest-typer, typer
- Language: Python
- Homepage: https://pytest-with-eric.com/pytest-advanced/pytest-argparse-typer/
- Size: 21.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Pytest Command-Line Argument Testing with Argparse and Typer
This repo contains the sample code for the article - [How To Test CLI Applications With Pytest, Argparse And Typer](https://pytest-with-eric.com/pytest-advanced/pytest-argparse-typer/)
# Requirements
* Python (3.12+)
Please install the dependencies via the `requirements.txt` file using
```bash
pip install -r requirements.txt
```
If you don't have Pip installed, please follow instructions online on how to do it.
# How To Run the Unit Tests
To run the Unit Tests from the root of the repo, run
```bash
pytest -v
```
If you have any questions about the project, please raise an Issue on GitHub.