https://github.com/sitbon/test-test
Testing tests testfully with pytest
https://github.com/sitbon/test-test
Last synced: about 1 month ago
JSON representation
Testing tests testfully with pytest
- Host: GitHub
- URL: https://github.com/sitbon/test-test
- Owner: sitbon
- Created: 2022-10-05T22:17:31.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-10-06T15:14:45.000Z (over 3 years ago)
- Last Synced: 2025-01-07T18:31:16.514Z (over 1 year ago)
- Language: Python
- Size: 27.3 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](
https://github.com/sitbon/test-test/commits/main)
# Testing Tests
Project for showcasing pytest features.
## Setup
### Virtual Environment
This project uses [poetry](https://python-poetry.org/) for dependency management.
```shell
$ poetry install
```
### Git Hooks
Only relevant when developing on this project.
```shell
$ git config --local core.hooksPath .hooks/
```
## Run
Run all tests and include coverage report (configured in `pyproject.toml`):
```shell
$ # -x: stop on first failure, -v: verbose
$ poetry run python -m pytest -xv
```
Filter by test naming:
```shell
$ poetry run python -m pytest -xv -k "test_print_hi"
```
Filter by test parametrization values:
```shell
$ poetry run python -m pytest -xv -k "test_print_hi[bob-world]"
$ poetry run python -m pytest -xv -k "test_print_hi and alice-"
$ poetry run python -m pytest -xv -k "test_fibonacci and fibonacci_recursive-"
```