forked from ebenp/figpager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
executable file
·61 lines (54 loc) · 1.48 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
# tox (https://tox.readthedocs.io/) 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]
isolated_build = False
envlist =
{py27,py36,py37}-stable
black
check-wheel-contents
isort
[testenv]
deps =
pytest
py27: pylint==1.9.4
py36,py37: pylint==2.3.1
whitelist_externals =
/bin/bash
/bin/echo
setenv =
TOX_INI_DIR = {toxinidir}
commands =
pip install -r requirements.txt
# test time.
pytest
# confirm we can build the wheel with no errors. use env-specific working dir
# so we don't ruin things for our friends
{envpython} setup.py bdist_wheel --bdist-dir {envdir}/bdist --dist-dir {envdir}/dist
# test installation
bash -c "pip install {envdir}/dist/*.whl"
# black formatting required
[testenv:black]
deps=
black==19.10b0
basepython=python3
commands=
# install the package to pick up requirements
pip install -r requirements.txt
# sanity checks on the wheel
[testenv:check-wheel-contents]
deps=
check-wheel-contents==0.1.0
basepython=python3
commands=
{envpython} setup.py bdist_wheel --bdist-dir {envdir}/bdist --dist-dir {envdir}/dist
bash -c "check-wheel-contents {envdir}/dist/*.whl"
# verify imports are sorted properly
[testenv:isort]
deps=
isort[pyproject]==4.3.9
basepython=python3
commands=
bash -c "cd {toxinidir}"
isort -rc .