-
Notifications
You must be signed in to change notification settings - Fork 1
/
tox.ini
57 lines (51 loc) · 1.39 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
# 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 = True
envlist =
py{27,36,37,38}
black
isort
[testenv]
deps =
py27: pylint==1.9.5
py{36,37,38}: pylint==2.5.0
commands =
pylint cpputest_mockify.py
[testenv:py27]
whitelist_externals =
/bin/bash
/bin/echo
/usr/bin/bash
/usr/bin/diff
/usr/bin/echo
deps =
py27: pylint==1.9.5
basepython=python2.7
commands =
pylint --disable="bad-continuation,fixme,line-too-long" cpputest_mockify.py
# run the tool on a test corpus and verify the output exactly matches
bash -c "echo 'n' | {envpython} cpputest_mockify.py test-header.h {envdir}/"
# test overwriting. normally use a here-doc (<<< "y") but not working in tox
bash -c "echo 'y' | {envpython} cpputest_mockify.py test-header.h {envdir}/"
diff mock_test-header.cpp {envdir}/mock_test-header.cpp
# black formatting required
[testenv:black]
deps=
black==19.10b0
basepython=python3
commands=
black --check --verbose .
# verify imports are sorted properly
[testenv:isort]
whitelist_externals =
/usr/bin/bash
/bin/bash
deps=
isort[pyproject]==4.3.9
basepython=python3
commands=
bash -c "cd {toxinidir} && isort -c"