X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FN2VC.git;a=blobdiff_plain;f=tox.ini;h=a568d3f0fd3791581b330a79e3cef5b9c8f8e8cc;hp=502214f1638e3abeaeb72ff5dce615c19ffd312d;hb=136186e189027698662452ee00a5e50ebe82384f;hpb=839299d635bb7b739aace1a242e28918577b13e2 diff --git a/tox.ini b/tox.ini index 502214f..a568d3f 100644 --- a/tox.ini +++ b/tox.ini @@ -4,28 +4,54 @@ # and then run "tox" from this directory. [tox] -envlist = lint,py35 +envlist = py3,lint,integration skipsdist=True +[pytest] +markers = + serial: mark a test that must run by itself + [testenv] basepython=python3 usedevelop=True # for testing with other python versions -commands=nosetests +commands = py.test --ignore modules/ --tb native -ra -v -s -n auto -k 'not integration' -m 'not serial' {posargs} +passenv = + HOME + VCA_HOST + VCA_PORT + VCA_USER + VCA_SECRET + # These are needed so executing `charm build` succeeds + TERM + TERMINFO deps = - nose mock - pyyaml + pyyaml + pytest + pytest-asyncio + pytest-xdist + paramiko + pylxd + +[testenv:py3] +# default tox env, excludes integration and serial tests +commands = + pytest --ignore modules/ --tb native -ra -v -s -n auto -k 'not integration' -m 'not serial' {posargs} [testenv:lint] -envdir = {toxworkdir}/py35 +envdir = {toxworkdir}/py3 commands = - flake8 --ignore E501 {posargs} juju tests + flake8 --ignore E501,E402 --exclude tests/charms/builds,tests/charms/deps {posargs} n2vc tests deps = flake8 +[testenv:integration] +envdir = {toxworkdir}/py3 +commands = py.test --ignore modules/ --tb native -ra -v -s -n 1 -k 'integration' -m 'serial' {posargs} + [testenv:build] -basepython = python3 -deps = stdeb - setuptools-version-command +deps = + stdeb + setuptools-version-command commands = python3 setup.py --command-packages=stdeb.command bdist_deb