pytest is recommended entry point
This commit is contained in:
parent
ec647d181c
commit
79fa0c6f9d
|
@ -93,17 +93,17 @@ export PYLAST_API_SECRET=TODO_ENTER_YOURS_HERE
|
||||||
To run all unit and integration tests:
|
To run all unit and integration tests:
|
||||||
```sh
|
```sh
|
||||||
pip install pytest flaky mock
|
pip install pytest flaky mock
|
||||||
py.test
|
pytest
|
||||||
```
|
```
|
||||||
|
|
||||||
Or run just one test case:
|
Or run just one test case:
|
||||||
```sh
|
```sh
|
||||||
py.test -k test_scrobble
|
pytest -k test_scrobble
|
||||||
```
|
```
|
||||||
|
|
||||||
To run with coverage:
|
To run with coverage:
|
||||||
```sh
|
```sh
|
||||||
py.test -v --cov pylast --cov-report term-missing
|
pytest -v --cov pylast --cov-report term-missing
|
||||||
coverage report # for command-line report
|
coverage report # for command-line report
|
||||||
coverage html # for HTML report
|
coverage html # for HTML report
|
||||||
open htmlcov/index.html
|
open htmlcov/index.html
|
||||||
|
|
2
tox.ini
2
tox.ini
|
@ -15,7 +15,7 @@ deps =
|
||||||
ipdb
|
ipdb
|
||||||
pytest-cov
|
pytest-cov
|
||||||
flaky
|
flaky
|
||||||
commands = py.test -v -s -W all --cov pylast --cov-report term-missing {posargs}
|
commands = pytest -v -s -W all --cov pylast --cov-report term-missing {posargs}
|
||||||
|
|
||||||
[testenv:venv]
|
[testenv:venv]
|
||||||
deps = ipdb
|
deps = ipdb
|
||||||
|
|
Loading…
Reference in a new issue