]> git.phdru.name Git - sqlconvert.git/blob - tox.ini
Test(tox.ini): Remove sitepackages
[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 # Don't fail or warn on uninstalled commands
20 whitelist_externals =
21     createdb
22     dropdb
23     flake8
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 commands =
70     {[testenv]commands}
71     -dropdb -U postgres -w test
72     createdb -U postgres -w test
73     pytest --cov=sqlconvert -D "postgres://postgres:Password12!@localhost/test"
74     dropdb -U postgres -w test
75
76 [testenv:py27-postgres-w32]
77 commands = {[postgres-w32]commands}
78
79 [testenv:py34-postgres-w32]
80 commands = {[postgres-w32]commands}
81
82 [testenv:py35-postgres-w32]
83 commands = {[postgres-w32]commands}
84
85 [testenv:py36-postgres-w32]
86 commands = {[postgres-w32]commands}
87
88 # SQLite test environments
89 [sqlite]
90 commands =
91     {[testenv]commands}
92     -rm.py -f /tmp/test.sqdb
93     {envpython} -m pytest --cov=sqlconvert -D sqlite:///tmp/test.sqdb
94     rm.py -f /tmp/test.sqdb
95
96 [testenv:py27-sqlite]
97 commands = {[sqlite]commands}
98
99 [testenv:py34-sqlite]
100 commands = {[sqlite]commands}
101
102 [testenv:py35-sqlite]
103 commands = {[sqlite]commands}
104
105 [testenv:py36-sqlite]
106 commands = {[sqlite]commands}
107
108 [sqlite-w32]
109 commands =
110     {[testenv]commands}
111     -rm.py -f C:/projects/sqlconvert/test.sqdb
112     pytest --cov=sqlconvert -D sqlite:/C:/projects/sqlconvert/test.sqdb?debug=1
113     rm.py -f C:/projects/sqlconvert/test.sqdb
114
115 [testenv:py27-sqlite-w32]
116 commands = {[sqlite-w32]commands}
117
118 [testenv:py34-sqlite-w32]
119 commands = {[sqlite-w32]commands}
120
121 [testenv:py35-sqlite-w32]
122 commands = {[sqlite-w32]commands}
123
124 # flake8
125 [testenv:py27-flake8]
126 deps =
127     flake8
128 commands =
129     {[testenv]commands}
130     flake8
131
132 [testenv:py34-flake8]
133 deps =
134     flake8
135 commands =
136     {[testenv]commands}
137     flake8