https://github.com/ffmeyer/testeunitario_trabalho2
https://github.com/ffmeyer/testeunitario_trabalho2
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ffmeyer/testeunitario_trabalho2
- Owner: ffmeyer
- Created: 2023-09-30T18:58:39.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-10T23:46:51.000Z (over 2 years ago)
- Last Synced: 2025-01-25T22:54:07.289Z (over 1 year ago)
- Language: Python
- Size: 22.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ETA
## Setup
```bash
pip install -r requirements.txt
```
## Unittest
```bash
python -m unittest -v
```
## Pytest
```bash
pytest .
```
## Test Coverage
- `coverage` and `pytest-cov` packages are required
- Add `pragma: no cover` to exclude code from coverage report
### With `pytest`
Terminal report:
```bash
pytest --cov-report term-missing --cov .
```
HTML report:
```bash
pytest --cov-report html --cov .
```
### With `unittest`
To generate report:
```bash
python -m coverage run -m unittest
```
To view report in terminal:
```bash
python -m coverage report
```
To view report in HTML:
```bash
python -m coverage html
```