-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
85 lines (71 loc) · 1.79 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# Tox (http://tox.testrun.org/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.
[tox]
envlist = doc, cov-init, py27, py34, py35, py36, py35-backcomp, cov-report
skip_missing_interpreters = true
project = pyhetdex
setenv =
PIP_EXTRA_INDEX_URL = https://gate.mpe.mpg.de/pypi
test_deps =
pytest-cov
pytest-xdist
pytest >= 3.3.0
[testenv]
# run the tests
usedevelop = True
setenv =
{[tox]setenv}
COVERAGE_FILE = .coverage.{envname}
passenv = CUREBIN
commands =
py.test {posargs}
deps = {[tox]test_deps}
peewee
# pytest-warnings
[testenv:py35-backcomp]
# test the code with astropy 1.2 and peewee 2
deps = {[tox]test_deps}
peewee < 3
astropy==1.2
[testenv:cov-init]
# clean the coverage files: should be run before any of the tests
basepython = python3
setenv =
{[tox]setenv}
COVERAGE_FILE = .coverage
deps =
coverage
commands =
coverage erase
[testenv:cov-report]
# collect the coverage files and create a html and print a report
basepython = python3
setenv =
{[tox]setenv}
COVERAGE_FILE = .coverage
deps =
coverage
little_deploy>=0.2
commands =
bash scripts/remove_empty_coverage.sh
coverage combine
coverage html
- little_deploy {[tox]project} cover {toxinidir}/cover
coverage report --fail-under 95
whitelist_externals =
bash
[testenv:doc]
# create the documentation
usedevelop = False
basepython = python3
changedir = doc
deps =
sphinx>=1.4
numpydoc
alabaster
little_deploy>=0.2
commands =
sphinx-build -b html -d {envtmpdir}/doctrees source {envtmpdir}/html
- little_deploy {[tox]project} doc {envtmpdir}/html