Merge "fix minor error"
[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/ --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 paramiko
35 pylxd
36
37 [testenv:py3]
38 # default tox env, excludes integration and serial tests
39 commands =
40 pytest --ignore modules/ --tb native -ra -v -s -n auto -k 'not integration' -m 'not serial' {posargs}
41
42 [testenv:lint]
43 envdir = {toxworkdir}/py3
44 commands =
45 flake8 --ignore E501,E402 --exclude tests/charms/builds,tests/charms/deps {posargs} n2vc tests
46 deps =
47 flake8
48
49 [testenv:integration]
50 envdir = {toxworkdir}/py3
51 commands = py.test --ignore modules/ --tb native -ra -v -s -n 1 -k 'integration' -m 'serial' {posargs}
52
53 [testenv:build]
54 deps =
55 stdeb
56 setuptools-version-command
57 commands = python3 setup.py --command-packages=stdeb.command bdist_deb