]> git.phdru.name Git - sqlconvert.git/blob - tox.ini
Test(tox): Do not restore `validators.py`
[sqlconvert.git] / tox.ini
1 [tox]
2 minversion = 2.0
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 platform = linux
23 # Don't fail or warn on uninstalled commands
24 whitelist_externals =
25     createdb
26     dropdb
27
28 [general]
29 commands =
30     {[testenv]commands}
31     {envpython} -m pytest --cov=sqlconvert
32     {envpython} {envbindir}/mysql2sql -P demo/demo.sql test.out
33     cmp.py -i tests/mysql2sql/test.out test.out
34     rm.py -f test.out
35
36 [testenv:py27]
37 platform = linux|win32
38 commands = {[general]commands}
39
40 [testenv:py34]
41 platform = linux|win32
42 commands = {[general]commands}
43
44 [testenv:py35]
45 platform = linux|win32
46 commands = {[general]commands}
47
48 [testenv:py36]
49 platform = linux|win32
50 commands = {[general]commands}
51
52 [testenv:py37]
53 platform = linux|win32
54 commands = {[general]commands}
55
56 [testenv:py38]
57 platform = linux|win32
58 commands = {[general]commands}
59
60 [testenv:py39]
61 platform = linux|win32
62 commands = {[general]commands}
63
64 # PostgreSQL test environments
65 [postgresql]
66 commands =
67     {[testenv]commands}
68     -dropdb -U postgres -w test
69     createdb -U postgres -w test
70     {envpython} -m pytest --cov=sqlconvert -D postgres://postgres:@localhost/test
71     dropdb -U postgres -w test
72
73 [testenv:py27-postgres]
74 commands = {[postgresql]commands}
75
76 [testenv:py34-postgres]
77 commands = {[postgresql]commands}
78
79 [testenv:py35-postgres]
80 commands = {[postgresql]commands}
81
82 [testenv:py36-postgres]
83 commands = {[postgresql]commands}
84
85 [testenv:py37-postgres]
86 commands = {[postgresql]commands}
87
88 [testenv:py38-postgres]
89 commands = {[postgresql]commands}
90
91 [testenv:py39-postgres]
92 commands = {[postgresql]commands}
93
94 [postgres-w32]
95 platform = win32
96 commands =
97     {[testenv]commands}
98     -dropdb -U postgres -w test
99     createdb -U postgres -w test
100     pytest --cov=sqlconvert -D "postgres://postgres:Password12!@localhost/test"
101     dropdb -U postgres -w test
102
103 [testenv:py27-postgres-w32]
104 platform = win32
105 commands = {[postgres-w32]commands}
106
107 [testenv:py34-postgres-w32]
108 platform = win32
109 commands = {[postgres-w32]commands}
110
111 [testenv:py35-postgres-w32]
112 platform = win32
113 commands = {[postgres-w32]commands}
114
115 [testenv:py36-postgres-w32]
116 platform = win32
117 commands = {[postgres-w32]commands}
118
119 [testenv:py37-postgres-w32]
120 platform = win32
121 commands =
122     {[postgres-w32]commands}
123
124 [testenv:py38-postgres-w32]
125 platform = win32
126 commands =
127     {[postgres-w32]commands}
128
129 [testenv:py39-postgres-w32]
130 platform = win32
131 commands =
132     {[postgres-w32]commands}
133
134 # SQLite test environments
135 [sqlite]
136 commands =
137     {[testenv]commands}
138     -rm.py -f /tmp/test.sqdb
139     {envpython} -m pytest --cov=sqlconvert -D sqlite:///tmp/test.sqdb
140     rm.py -f /tmp/test.sqdb
141
142 [testenv:py27-sqlite]
143 commands = {[sqlite]commands}
144
145 [testenv:py34-sqlite]
146 commands = {[sqlite]commands}
147
148 [testenv:py35-sqlite]
149 commands = {[sqlite]commands}
150
151 [testenv:py36-sqlite]
152 commands = {[sqlite]commands}
153
154 [testenv:py37-sqlite]
155 commands = {[sqlite]commands}
156
157 [testenv:py38-sqlite]
158 commands = {[sqlite]commands}
159
160 [testenv:py39-sqlite]
161 commands = {[sqlite]commands}
162
163 [sqlite-w32]
164 platform = win32
165 commands =
166     {[testenv]commands}
167     -rm.py -f C:/projects/sqlconvert/test.sqdb
168     pytest --cov=sqlconvert -D sqlite:/C:/projects/sqlconvert/test.sqdb?debug=1
169     rm.py -f C:/projects/sqlconvert/test.sqdb
170
171 [testenv:py27-sqlite-w32]
172 platform = win32
173 commands = {[sqlite-w32]commands}
174
175 [testenv:py34-sqlite-w32]
176 platform = win32
177 commands = {[sqlite-w32]commands}
178
179 [testenv:py35-sqlite-w32]
180 platform = win32
181 commands = {[sqlite-w32]commands}
182
183 [testenv:py36-sqlite-w32]
184 platform = win32
185 commands = {[sqlite-w32]commands}
186
187 [testenv:py37-sqlite-w32]
188 platform = win32
189 commands =
190     {[sqlite-w32]commands}
191
192 [testenv:py38-sqlite-w32]
193 platform = win32
194 commands =
195     {[sqlite-w32]commands}
196
197 [testenv:py39-sqlite-w32]
198 platform = win32
199 commands =
200     {[sqlite-w32]commands}
201
202 # flake8
203 [testenv:py27-flake8]
204 platform = linux|win32
205 deps =
206     flake8
207 commands =
208     {[testenv]commands}
209     flake8
210
211 [testenv:py39-flake8]
212 platform = linux|win32
213 deps =
214     flake8
215 commands =
216     {[testenv]commands}
217     flake8