mirror of
https://github.com/bellingcat/auto-archiver-api.git
synced 2026-06-08 03:28:35 +03:00
adding code coverage to test execution
This commit is contained in:
20
README.md
20
README.md
@@ -68,4 +68,24 @@ Run `pipenv update auto-archiver` inside `src` to update the auto-archiver versi
|
||||
# CALL /sheet POST endpoint
|
||||
curl -XPOST -H "Authorization: Bearer GOOGLE_OAUTH_TOKEN" -H "Content-type: application/json" -d '{"sheet_id": "SHEET_ID", "header": 1}' 'http://localhost:8004/sheet'
|
||||
|
||||
```
|
||||
|
||||
|
||||
### Testing
|
||||
```bash
|
||||
# can be done from top level but let's do it from the src folder for consistency with CI etc
|
||||
cd src
|
||||
# run tests
|
||||
PYTHONPATH=. pipenv run pytest -v --color=yes tests/
|
||||
|
||||
# TO GET COVERAGE
|
||||
# run tests with coverage instead
|
||||
PYTHONPATH=. pipenv run coverage run -m pytest -v --color=yes tests/
|
||||
|
||||
# get coverage
|
||||
pipenv run coverage report
|
||||
# get coverage HTML
|
||||
|
||||
pipenv run coverage html
|
||||
# > open/run server on htmlcov/index.html to navigate through line coverage
|
||||
```
|
||||
Reference in New Issue
Block a user