]> git.phdru.name Git - sqlconvert.git/blob - tox.ini
Set toxworkdir to ~/.tox
[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     createdb test
43     python -m pytest --cov=sqlconvert -D postgres:///test
44     dropdb test
45
46 [testenv:py26-postgres]
47 commands = {[postgresql]commands}
48
49 [testenv:py27-postgres]
50 commands = {[postgresql]commands}
51
52 [testenv:py34-postgres]
53 commands = {[postgresql]commands}
54
55 # SQLite test environments
56 [sqlite]
57 commands =
58     python -m pytest --cov=sqlconvert -D sqlite:///tmp/test.sqdb
59     rm -f /tmp/test.sqdb
60
61 [testenv:py26-sqlite]
62 commands = {[sqlite]commands}
63
64 [testenv:py27-sqlite]
65 commands = {[sqlite]commands}
66
67 [testenv:py34-sqlite]
68 commands = {[sqlite]commands}
69
70 # flake8
71 [testenv:py27-flake8]
72 deps =
73     flake8
74 commands = flake8
75
76 [testenv:py34-flake8]
77 deps =
78     flake8
79 commands = flake8