Added some helpful tools and configurations
parent
5cbd4f3d95
commit
03ad413f4a
@ -0,0 +1,2 @@
|
|||||||
|
[run]
|
||||||
|
omit = qurator/dinglehopper/tests/*
|
@ -1,10 +1,37 @@
|
|||||||
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
|
||||||
virtualenv -p /usr/bin/python3 venv
|
virtualenv -p /usr/bin/python3 venv
|
||||||
. venv/bin/activate
|
. venv/bin/activate
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
pip install pytest
|
pip install -r requirements-dev.txt
|
||||||
pytest
|
pytest
|
||||||
~~~
|
```
|
||||||
|
|
||||||
|
### Test running examples
|
||||||
|
### Only unit tests
|
||||||
|
```bash
|
||||||
|
pytest -m "not integration"
|
||||||
|
```
|
||||||
|
|
||||||
|
### Only integration tests
|
||||||
|
```bash
|
||||||
|
pytest -m integration
|
||||||
|
```
|
||||||
|
|
||||||
|
### All tests
|
||||||
|
```bash
|
||||||
|
pytest
|
||||||
|
```
|
||||||
|
|
||||||
|
### All tests with code coverage
|
||||||
|
```bash
|
||||||
|
pytest --cov=qurator --cov-report=html
|
||||||
|
```
|
||||||
|
|
||||||
|
### Static code analysis
|
||||||
|
```bash
|
||||||
|
pytest -k "not test" --flake8
|
||||||
|
pytest -k "not test" --mypy
|
||||||
|
```
|
||||||
|
@ -0,0 +1,4 @@
|
|||||||
|
pytest
|
||||||
|
pytest-flake8
|
||||||
|
pytest-cov
|
||||||
|
pytest-mypy
|
@ -1,2 +1,12 @@
|
|||||||
[flake8]
|
[flake8]
|
||||||
max-line-length = 90
|
max-line-length = 88
|
||||||
|
extend-ignore = E203, W503
|
||||||
|
|
||||||
|
[pylint]
|
||||||
|
max-line-length = 88
|
||||||
|
|
||||||
|
[pylint.messages_control]
|
||||||
|
disable = C0330, C0326
|
||||||
|
|
||||||
|
[mypy]
|
||||||
|
ignore_missing_imports = True
|
||||||
|
Loading…
Reference in New Issue