Fix bug 659: Don't use static member variables
[osm/N2VC.git] / tox.ini
1 # Tox (http://tox.testrun.org/) is a tool for running tests
2 # in multiple virtualenvs. This configuration file will run the
3 # test suite on all supported python versions. To use it, "pip install tox"
4 # and then run "tox" from this directory.
5
6 [tox]
7 envlist = py3,lint,integration
8 skipsdist=True
9
10 [pytest]
11 markers =
12 serial: mark a test that must run by itself
13
14 [testenv]
15 basepython=python3
16 usedevelop=True
17 # for testing with other python versions
18 commands = py.test --ignore modules/ --ignore tests/charms/ --tb native -ra -v -s -n auto -k 'not integration' -m 'not serial' {posargs}
19 passenv =
20 HOME
21 VCA_HOST
22 VCA_PORT
23 VCA_USER
24 VCA_SECRET
25 # These are needed so executing `charm build` succeeds
26 TERM
27 TERMINFO
28 deps =
29 mock
30 pyyaml
31 pytest
32 pytest-asyncio
33 pytest-xdist
34 pytest-assume
35 paramiko
36 pylxd
37
38 [testenv:py3]
39 # default tox env, excludes integration and serial tests
40 commands =
41 pytest --ignore modules/ --ignore tests/charms/ --tb native -ra -v -s -n auto -k 'not integration' -m 'not serial' {posargs}
42
43 [testenv:lint]
44 envdir = {toxworkdir}/py3
45 commands =
46 flake8 --ignore E501,E402 --exclude tests/charms/builds,tests/charms/deps {posargs} n2vc tests
47 deps =
48 flake8
49
50 [testenv:integration]
51 envdir = {toxworkdir}/py3
52 commands = py.test --ignore modules/ --ignore tests/charms/ --tb native -ra -v -s -n 1 -k 'integration' -m 'serial' {posargs}
53
54 [testenv:build]
55 deps =
56 stdeb
57 setuptools-version-command
58 commands = python3 setup.py --command-packages=stdeb.command bdist_deb