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