Merge changes Iacd2f028,I43a6d573,Ibb6c93bb
[osm/N2VC.git] / tox.ini
diff --git a/tox.ini b/tox.ini
index 789bbeb..a568d3f 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -4,25 +4,54 @@
 # and then run "tox" from this directory.
 
 [tox]
-envlist = 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 = 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 =
+    mock
+    pyyaml
     pytest
     pytest-asyncio
     pytest-xdist
-    mock
-    asynctest
-    ipdb
+    paramiko
+    pylxd
 
-[testenv:py35]
-# default tox env excludes integration tests
-commands = py.test -ra -v -s -x -n auto -k 'not integration' {posargs}
+[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}/py3
+commands =
+    flake8 --ignore E501,E402 --exclude tests/charms/builds,tests/charms/deps {posargs} n2vc tests
+deps =
+    flake8
 
 [testenv:integration]
-basepython=python3
-commands = py.test -ra -v -s -x -n auto {posargs}
+envdir = {toxworkdir}/py3
+commands = py.test --ignore modules/ --tb native -ra -v -s -n 1 -k 'integration' -m 'serial' {posargs}
+
+[testenv:build]
+deps =
+    stdeb
+    setuptools-version-command
+commands = python3 setup.py --command-packages=stdeb.command bdist_deb