-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
- pytest-assume
- paramiko
- pylxd
-
-[testenv:py3]
-# default tox env, excludes integration and serial tests
+usedevelop = True
+basepython = python3.8
+setenv = VIRTUAL_ENV={envdir}
+ PYTHONDONTWRITEBYTECODE = 1
+deps = -r{toxinidir}/requirements.txt
+
+
+#######################################################################################
+[testenv:black]
+deps = black
+skip_install = true
+commands =
+ black --check --diff n2vc/
+ black --check --diff setup.py
+
+
+#######################################################################################
+[testenv:cover]
+deps = {[testenv]deps}
+ -r{toxinidir}/requirements-dev.txt
+ -r{toxinidir}/requirements-test.txt
+commands =
+ sh -c 'rm -f nosetests.xml'
+ coverage erase
+ nose2 -C --coverage n2vc
+ coverage report --omit='*tests*'
+ coverage html -d ./cover --omit='*tests*'
+ coverage xml -o coverage.xml --omit=*tests*
+whitelist_externals = sh
+
+
+#######################################################################################
+[testenv:flake8]
+deps = flake8
+commands =
+ flake8 n2vc/ setup.py
+
+
+#######################################################################################
+[testenv:pylint]
+deps = {[testenv]deps}
+ -r{toxinidir}/requirements-dev.txt
+ -r{toxinidir}/requirements-test.txt
+ pylint==2.10.2
+commands =
+ pylint -E n2vc
+
+
+#######################################################################################
+[testenv:safety]
+setenv =
+ LC_ALL=C.UTF-8
+ LANG=C.UTF-8
+deps = {[testenv]deps}
+ safety
+commands =
+ - safety check --full-report
+
+
+#######################################################################################
+[testenv:pip-compile]
+deps = pip-tools==6.4.0
+skip_install = true
+whitelist_externals = bash
+ [