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