]> git.phdru.name Git - sqlconvert.git/blob - tox.ini
Drop test DB if it persisted from the previous run
[sqlconvert.git] / tox.ini
1 [tox]
2 minversion = 1.8
3 toxworkdir={homedir}/.tox/sqlconvert
4 envlist = {py26,py27,py34},{py26,py27,py34}-{postgres,sqlite},{py27,py34}-flake8
5
6 # Base test environment settings
7 [testenv]
8 deps =
9     sqlparse
10     pytest
11     pytest-cov
12     py26: argparse
13     py26,py27: SQLObject>=2.2.1
14     py34: SQLObject>=3.0.0
15     py26,py27: m_lib>=2.0
16     py34: m_lib>=3.0
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     rm
25
26 [general]
27 commands =
28     python -m pytest --cov=sqlconvert
29
30 [testenv:py26]
31 commands = {[general]commands}
32
33 [testenv:py27]
34 commands = {[general]commands}
35
36 [testenv:py34]
37 commands = {[general]commands}
38
39 # PostgreSQL test environments
40 [postgresql]
41 commands =
42     -dropdb test
43     createdb test
44     python -m pytest --cov=sqlconvert -D postgres:///test
45     dropdb test
46
47 [testenv:py26-postgres]
48 commands = {[postgresql]commands}
49
50 [testenv:py27-postgres]
51 commands = {[postgresql]commands}
52
53 [testenv:py34-postgres]
54 commands = {[postgresql]commands}
55
56 # SQLite test environments
57 [sqlite]
58 commands =
59     python -m pytest --cov=sqlconvert -D sqlite:///tmp/test.sqdb
60     rm -f /tmp/test.sqdb
61
62 [testenv:py26-sqlite]
63 commands = {[sqlite]commands}
64
65 [testenv:py27-sqlite]
66 commands = {[sqlite]commands}
67
68 [testenv:py34-sqlite]
69 commands = {[sqlite]commands}
70
71 # flake8
72 [testenv:py27-flake8]
73 deps =
74     flake8
75 commands = flake8
76
77 [testenv:py34-flake8]
78 deps =
79     flake8
80 commands = flake8