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