]> git.phdru.name Git - sqlconvert.git/blob - tox.ini
Tests(tox): Limit `VIRTUALENV_PIP` version for Python 3.4
[sqlconvert.git] / tox.ini
1 [tox]
2 minversion = 3.15
3 envlist = py27,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     postgres: psycopg2-binary
21 passenv = PGPASSWORD
22 setenv =
23     VIRTUALENV_PIP = 19.1.1
24 platform = linux
25 # Don't fail or warn on uninstalled commands
26 whitelist_externals =
27     createdb
28     dropdb
29
30 [testenv:{py27,py34,py35,py36,py37,py38,py39}]
31 platform = linux|win32
32 commands =
33     {[testenv]commands}
34     {envpython} -m pytest --cov=sqlconvert
35     {envpython} {envbindir}/mysql2sql -P demo/demo.sql test.out
36     cmp.py -i tests/mysql2sql/test.out test.out
37     rm.py -f test.out
38
39 [testenv:{py27,py34,py35,py36,py37,py38,py39}-sqlite]
40 commands =
41     {[testenv]commands}
42     -rm.py -f /tmp/test.sqdb
43     {envpython} -m pytest --cov=sqlconvert -D sqlite:///tmp/test.sqdb
44     rm.py -f /tmp/test.sqdb
45
46 [testenv:{py27,py34,py35,py36,py37,py38,py39}-sqlite-w32]
47 platform = win32
48 commands =
49     {[testenv]commands}
50     -rm.py -f C:/projects/sqlconvert/test.sqdb
51     pytest --cov=sqlconvert -D sqlite:/C:/projects/sqlconvert/test.sqdb?debug=1
52     rm.py -f C:/projects/sqlconvert/test.sqdb
53
54 [testenv:{py27,py34,py35,py36,py37,py38,py39}-postgres]
55 commands =
56     {[testenv]commands}
57     -dropdb -U postgres -w test
58     createdb -U postgres -w test
59     {envpython} -m pytest --cov=sqlconvert -D postgres://postgres:@localhost/test
60     dropdb -U postgres -w test
61
62 [testenv:{py27,py34,py35,py36,py37,py38,py39}-postgres-w32]
63 platform = win32
64 commands =
65     {[testenv]commands}
66     -dropdb -U postgres -w test
67     createdb -U postgres -w test
68     pytest --cov=sqlconvert -D "postgres://postgres:Password12!@localhost/test"
69     dropdb -U postgres -w test
70
71 # flake8
72 [testenv:{py27,py34,py35,py36,py37,py38,py39}-flake8]
73 platform = linux|win32
74 deps =
75     flake8
76 commands =
77     {[testenv]commands}
78     flake8