]> git.phdru.name Git - sqlconvert.git/blob - tox.ini
eb6b3550ced5083e3ed9375c3f1ef48580e61ae4
[sqlconvert.git] / tox.ini
1 [tox]
2 minversion = 1.8
3 envlist = {py26,py27,py34,py35,py36},{py26,py27,py34,py35,py36}-{postgres,sqlite},{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     sqlparse
17     pytest
18     pytest-cov
19     py26: argparse
20     py2{6,7}: SQLObject>=2.2.1
21     py3{4,5,6}: SQLObject>=3.0.0
22     m_lib>=3.1
23     m_lib.defenc>=1.0
24     postgres: psycopg2
25 sitepackages = True
26 # Don't fail or warn on uninstalled commands
27 whitelist_externals =
28     flake8
29     createdb
30     dropdb
31
32 [general]
33 commands =
34     {[testenv]commands}
35     {envpython} -m pytest --cov=sqlconvert
36     {envpython} {envbindir}/mysql2sql -P demo/demo.sql test.out
37     {envpython} devscripts/cmp.py -i tests/mysql2sql/test.out test.out
38     {envpython} devscripts/rm.py test.out
39
40 [testenv:py26]
41 commands = {[general]commands}
42
43 [testenv:py27]
44 commands = {[general]commands}
45
46 [testenv:py34]
47 commands = {[general]commands}
48
49 [testenv:py35]
50 commands = {[general]commands}
51
52 [testenv:py36]
53 commands = {[general]commands}
54
55 # PostgreSQL test environments
56 [postgresql]
57 commands =
58     {[testenv]commands}
59     -dropdb test
60     createdb test
61     {envpython} -m pytest --cov=sqlconvert -D postgres:///test
62     dropdb test
63
64 [testenv:py26-postgres]
65 commands = {[postgresql]commands}
66
67 [testenv:py27-postgres]
68 commands = {[postgresql]commands}
69
70 [testenv:py34-postgres]
71 commands = {[postgresql]commands}
72
73 [testenv:py35-postgres]
74 commands = {[postgresql]commands}
75
76 [testenv:py36-postgres]
77 commands = {[postgresql]commands}
78
79 # SQLite test environments
80 [sqlite]
81 commands =
82     {[testenv]commands}
83     {envpython} -m pytest --cov=sqlconvert -D sqlite:///tmp/test.sqdb
84     {envpython} devscripts/rm.py /tmp/test.sqdb
85
86 [testenv:py26-sqlite]
87 commands = {[sqlite]commands}
88
89 [testenv:py27-sqlite]
90 commands = {[sqlite]commands}
91
92 [testenv:py34-sqlite]
93 commands = {[sqlite]commands}
94
95 [testenv:py35-sqlite]
96 commands = {[sqlite]commands}
97
98 [testenv:py36-sqlite]
99 commands = {[sqlite]commands}
100
101 # flake8
102 [testenv:py27-flake8]
103 deps =
104     flake8
105 commands =
106     {[testenv]commands}
107     flake8
108
109 [testenv:py34-flake8]
110 deps =
111     flake8
112 commands =
113     {[testenv]commands}
114     flake8