This repository has been archived by the owner on Sep 2, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 44
/
tox.ini
58 lines (51 loc) · 1.45 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
[tox]
envlist = cov-init,pylint,lint,py39,cov-report
skip_missing_interpreters = True
[testenv]
usedevelop=True
setenv =
COVERAGE_FILE = .coverage.{envname}
passenv =
USERNAME
PASSWORD
whitelist_externals = /usr/bin/env
install_command = /usr/bin/env LANG=C.UTF-8 pip install {opts} {packages}
commands =
# coverage erase
# pytest --timeout=9 --duration=10 --cov --cov-report= {posargs} tests
pytest --cov --cov-report= {posargs} tests
# pytest --timeout=9 --duration=10 --cov=pyhydroquebec --cov-report=html --cov-report=term --cov-report=xml {posargs} tests
# coverage html --include=pyhydroquebec/*
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/test_requirements.txt
[testenv:cov-init]
setenv =
COVERAGE_FILE = .coverage
deps = coverage
commands =
coverage erase
[testenv:cov-report]
setenv =
COVERAGE_FILE = .coverage
deps = coverage
commands =
coverage combine
coverage report --include=pyhydroquebec/*
coverage html --include=pyhydroquebec/*
[testenv:pylint]
basepython = {env:PYTHON3_PATH:python3}
ignore_errors = True
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/test_requirements.txt
commands =
pylint --rcfile=.pylintrc pyhydroquebec tests
[testenv:lint]
basepython = {env:PYTHON3_PATH:python3}
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/test_requirements.txt
commands =
flake8 --max-line-length=100 pyhydroquebec tests
pydocstyle pyhydroquebec tests