]> git.phdru.name Git - sqlconvert.git/blob - tox.ini
Tests(tox.ini): Don't whitelist flake8
[sqlconvert.git] / tox.ini
1 [tox]
2 minversion = 2.0
3 envlist = {py27,py34,py35,py36},{py27,py34,py35,py36}-{postgres,postgres-w32,sqlite,sqlite-w32},{py27,py34}-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 commands =
13     {envpython} --version
14     {envpython} -c "import struct; print(struct.calcsize('P') * 8)"
15 deps =
16     -rdevscripts/requirements/requirements_tests.txt
17     postgres: psycopg2
18 passenv = PGPASSWORD
19 platform = linux
20 # Don't fail or warn on uninstalled commands
21 whitelist_externals =
22     createdb
23     dropdb
24     cmp.py
25     rm.py
26
27 [general]
28 commands =
29     {[testenv]commands}
30     {envpython} -m pytest --cov=sqlconvert
31     {envpython} {envbindir}/mysql2sql -P demo/demo.sql test.out
32     cmp.py -i tests/mysql2sql/test.out test.out
33     rm.py -f test.out
34
35 [testenv:py27]
36 commands = {[general]commands}
37
38 [testenv:py34]
39 commands = {[general]commands}
40
41 [testenv:py35]
42 commands = {[general]commands}
43
44 [testenv:py36]
45 commands = {[general]commands}
46
47 # PostgreSQL test environments
48 [postgresql]
49 commands =
50     {[testenv]commands}
51     -dropdb -U postgres -w test
52     createdb -U postgres -w test
53     {envpython} -m pytest --cov=sqlconvert -D postgres://postgres:@localhost/test
54     dropdb -U postgres -w test
55
56 [testenv:py27-postgres]
57 commands = {[postgresql]commands}
58
59 [testenv:py34-postgres]
60 commands = {[postgresql]commands}
61
62 [testenv:py35-postgres]
63 commands = {[postgresql]commands}
64
65 [testenv:py36-postgres]
66 commands = {[postgresql]commands}
67
68 [postgres-w32]
69 platform = win32
70 commands =
71     {[testenv]commands}
72     -dropdb -U postgres -w test
73     createdb -U postgres -w test
74     pytest --cov=sqlconvert -D "postgres://postgres:Password12!@localhost/test"
75     dropdb -U postgres -w test
76
77 [testenv:py27-postgres-w32]
78 platform = win32
79 commands = {[postgres-w32]commands}
80
81 [testenv:py34-postgres-w32]
82 platform = win32
83 commands = {[postgres-w32]commands}
84
85 [testenv:py35-postgres-w32]
86 platform = win32
87 commands = {[postgres-w32]commands}
88
89 [testenv:py36-postgres-w32]
90 platform = win32
91 commands = {[postgres-w32]commands}
92
93 # SQLite test environments
94 [sqlite]
95 commands =
96     {[testenv]commands}
97     -rm.py -f /tmp/test.sqdb
98     {envpython} -m pytest --cov=sqlconvert -D sqlite:///tmp/test.sqdb
99     rm.py -f /tmp/test.sqdb
100
101 [testenv:py27-sqlite]
102 commands = {[sqlite]commands}
103
104 [testenv:py34-sqlite]
105 commands = {[sqlite]commands}
106
107 [testenv:py35-sqlite]
108 commands = {[sqlite]commands}
109
110 [testenv:py36-sqlite]
111 commands = {[sqlite]commands}
112
113 [sqlite-w32]
114 platform = win32
115 commands =
116     {[testenv]commands}
117     -rm.py -f C:/projects/sqlconvert/test.sqdb
118     pytest --cov=sqlconvert -D sqlite:/C:/projects/sqlconvert/test.sqdb?debug=1
119     rm.py -f C:/projects/sqlconvert/test.sqdb
120
121 [testenv:py27-sqlite-w32]
122 platform = win32
123 commands = {[sqlite-w32]commands}
124
125 [testenv:py34-sqlite-w32]
126 platform = win32
127 commands = {[sqlite-w32]commands}
128
129 [testenv:py35-sqlite-w32]
130 platform = win32
131 commands = {[sqlite-w32]commands}
132
133 # flake8
134 [testenv:py27-flake8]
135 deps =
136     flake8
137 commands =
138     {[testenv]commands}
139     flake8
140
141 [testenv:py34-flake8]
142 deps =
143     flake8
144 commands =
145     {[testenv]commands}
146     flake8