blob: ce421d6d3696ed55085b23747fdf9a81ac7e4f00 [file] [log] [blame]
Adam Israeldcdf82b2017-08-15 15:26:43 -04001# 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]
Adam Israel1a15d1c2017-10-23 12:00:49 -04007envlist = lint,py35
Adam Israeldcdf82b2017-08-15 15:26:43 -04008skipsdist=True
9
10[testenv]
Adam Israel1a15d1c2017-10-23 12:00:49 -040011basepython=python3
Adam Israeldcdf82b2017-08-15 15:26:43 -040012usedevelop=True
Adam Israel1a15d1c2017-10-23 12:00:49 -040013# for testing with other python versions
14commands = py.test -ra -v -s -x -n auto {posargs}
Adam Israeldcdf82b2017-08-15 15:26:43 -040015passenv =
16 HOME
17deps =
18 pytest
19 pytest-asyncio
20 pytest-xdist
21 mock
22 asynctest
23 ipdb
24
25[testenv:py35]
26# default tox env excludes integration tests
27commands = py.test -ra -v -s -x -n auto -k 'not integration' {posargs}
28
Adam Israel1a15d1c2017-10-23 12:00:49 -040029[testenv:lint]
30envdir = {toxworkdir}/py35
31commands =
32 flake8 --ignore E501 {posargs} juju
33deps =
34 flake8
35
Adam Israeldcdf82b2017-08-15 15:26:43 -040036[testenv:integration]
Adam Israel1a15d1c2017-10-23 12:00:49 -040037envdir = {toxworkdir}/py35
38
39[flake8]
40exclude = juju/client/_*