|
|
@ -1,5 +1,5 @@
|
|
|
|
# Testing
|
|
|
|
Testing
|
|
|
|
|
|
|
|
=======
|
|
|
|
Use `pytest` to run the tests in [the tests directory](qurator/dinglehopper/tests):
|
|
|
|
Use `pytest` to run the tests in [the tests directory](qurator/dinglehopper/tests):
|
|
|
|
```bash
|
|
|
|
```bash
|
|
|
|
virtualenv -p /usr/bin/python3 venv
|
|
|
|
virtualenv -p /usr/bin/python3 venv
|
|
|
@ -9,28 +9,28 @@ pip install -r requirements-dev.txt
|
|
|
|
pytest
|
|
|
|
pytest
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
### Test running examples
|
|
|
|
## Test running examples
|
|
|
|
### Only unit tests
|
|
|
|
Only unit tests:
|
|
|
|
```bash
|
|
|
|
```bash
|
|
|
|
pytest -m "not integration"
|
|
|
|
pytest -m "not integration"
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
### Only integration tests
|
|
|
|
Only integration tests:
|
|
|
|
```bash
|
|
|
|
```bash
|
|
|
|
pytest -m integration
|
|
|
|
pytest -m integration
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
### All tests
|
|
|
|
All tests:
|
|
|
|
```bash
|
|
|
|
```bash
|
|
|
|
pytest
|
|
|
|
pytest
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
### All tests with code coverage
|
|
|
|
All tests with code coverage:
|
|
|
|
```bash
|
|
|
|
```bash
|
|
|
|
pytest --cov=qurator --cov-report=html
|
|
|
|
pytest --cov=qurator --cov-report=html
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
### Static code analysis
|
|
|
|
Static code analysis:
|
|
|
|
```bash
|
|
|
|
```bash
|
|
|
|
pytest -k "not test" --flake8
|
|
|
|
pytest -k "not test" --flake8
|
|
|
|
pytest -k "not test" --mypy
|
|
|
|
pytest -k "not test" --mypy
|
|
|
|