]> git.phdru.name Git - m_librarian.git/blob - tox.ini
Test(tox): Refactor `tox.ini`: combine environments
[m_librarian.git] / tox.ini
1 [tox]
2 minversion = 3.15
3 envlist = py27-sqlite,py3{4,5,6,7,8,9}-sqlite,py{27,39}-flake8
4
5 # Base test environment settings
6 [testenv]
7 basepython =
8     py27: {env:TOXPYTHON:python2.7}
9     py34: {env:TOXPYTHON:python3.4}
10     py35: {env:TOXPYTHON:python3.5}
11     py36: {env:TOXPYTHON:python3.6}
12     py37: {env:TOXPYTHON:python3.7}
13     py38: {env:TOXPYTHON:python3.8}
14     py39: {env:TOXPYTHON:python3.9}
15 commands =
16     {envpython} --version
17     {envpython} -c "import struct; print(struct.calcsize('P') * 8)"
18 deps =
19     -rdevscripts/requirements/requirements_tests.txt
20 passenv = CI TRAVIS TRAVIS_* APPVEYOR DISTUTILS_USE_SDK MSSdk INCLUDE LIB WINDIR
21 platform = linux
22
23 [testenv:{py27,py34,py35,py36,py37,py38,py39}-sqlite]
24 commands =
25     {[testenv]commands}
26     -rm.py -f /tmp/test.sqdb
27     {envpython} -m pytest --cov=m_librarian -D sqlite:///tmp/test.sqdb
28
29 [testenv:{py27,py34,py35,py36,py37,py38,py39}-sqlite-w32]
30 platform = win32
31 commands =
32     {[testenv]commands}
33     -rm.py -f C:/projects/m-librarian/test.sqdb
34     pytest --cov=m_librarian -D sqlite:/C:/projects/m-librarian/test.sqdb?debug=1
35     rm.py -f C:/projects/m-librarian/test.sqdb
36
37 # flake8
38 [testenv:{py27,py34,py35,py36,py37,py38,py39}-flake8]
39 deps =
40     flake8
41 commands =
42     {[testenv]commands}
43     flake8