[tox]
envlist = pep8,py27,py3
skip_missing_interpreters = True

[testenv]
basepython =
    py27: python2.7
    py3: python3
setenv = VIRTUAL_ENV={envdir}
usedevelop = true
deps =
  {env:NO_INDEX:}
  --use-wheel
  --find-links=file://{toxinidir}/wheelhouse
  -r{toxinidir}/requirements.txt
  -r{toxinidir}/test-requirements.txt

commands = coverage run --source=ceph_detect_init {envbindir}/py.test -v tests
           coverage report --omit=*test*,*tox* --show-missing --fail-under=100

[testenv:pep8]
basepython = python2
commands = flake8 ceph_detect_init tests

[testenv:integration]
basepython = python2
setenv = VIRTUAL_ENV={envdir}
deps = -r{toxinidir}/requirements.txt
  -r{toxinidir}/test-requirements.txt

commands = {envbindir}/py.test -v integration/test_main.py
