]> git.phdru.name Git - sqlconvert.git/blob - tox.ini
6feee24747adef5a717568e83515b915da9e0c3f
[sqlconvert.git] / tox.ini
1 [tox]
2 minversion = 1.8
3 envlist = {py27,py34,py35,py36},{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:py27]
34 commands = {[general]commands}
35
36 [testenv:py34]
37 commands = {[general]commands}
38
39 [testenv:py35]
40 commands = {[general]commands}
41
42 [testenv:py36]
43 commands = {[general]commands}
44
45 # PostgreSQL test environments
46 [postgresql]
47 commands =
48     {[testenv]commands}
49     -dropdb test
50     createdb test
51     {envpython} -m pytest --cov=sqlconvert -D postgres:///test
52     dropdb test
53
54 [testenv:py27-postgres]
55 commands = {[postgresql]commands}
56
57 [testenv:py34-postgres]
58 commands = {[postgresql]commands}
59
60 [testenv:py35-postgres]
61 commands = {[postgresql]commands}
62
63 [testenv:py36-postgres]
64 commands = {[postgresql]commands}
65
66 # SQLite test environments
67 [sqlite]
68 commands =
69     {[testenv]commands}
70     -{envpython} {envbindir}/rm.py /tmp/test.sqdb
71     {envpython} -m pytest --cov=sqlconvert -D sqlite:///tmp/test.sqdb
72     {envpython} {envbindir}/rm.py /tmp/test.sqdb
73
74 [testenv:py27-sqlite]
75 commands = {[sqlite]commands}
76
77 [testenv:py34-sqlite]
78 commands = {[sqlite]commands}
79
80 [testenv:py35-sqlite]
81 commands = {[sqlite]commands}
82
83 [testenv:py36-sqlite]
84 commands = {[sqlite]commands}
85
86 # flake8
87 [testenv:py27-flake8]
88 deps =
89     flake8
90 commands =
91     {[testenv]commands}
92     flake8
93
94 [testenv:py34-flake8]
95 deps =
96     flake8
97 commands =
98     {[testenv]commands}
99     flake8