diff --git a/.coveragerc b/.coveragerc index bdd0ee85f..a50fe0e7c 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1,5 +1,7 @@ # .coveragerc to control coverage.py [run] +# Source +source = cmd2.py # (boolean, default False): whether to measure branch coverage in addition to statement coverage. branch = False diff --git a/tox.ini b/tox.ini index 946f21366..1a7e26870 100644 --- a/tox.ini +++ b/tox.ini @@ -1,8 +1,13 @@ [tox] envlist = py27,py33,py34,py35,py36,py36-winpy37,pypy +[pytest] +testpaths = tests + [testenv] passenv = CI TRAVIS TRAVIS_* APPVEYOR* +setenv = + PYTHONPATH={toxinidir} [testenv:py27] deps = @@ -12,9 +17,10 @@ deps = pyperclip pytest pytest-cov + pytest-xdist six commands = - py.test -v --cov=cmd2 --basetemp={envtmpdir} {posargs} + py.test {posargs: -n 2} --cov=cmd2 --cov-report=term-missing codecov [testenv:py33] @@ -55,9 +61,10 @@ deps = pyperclip pytest pytest-cov + pytest-xdist six commands = - py.test -v --cov=cmd2 --basetemp={envtmpdir} {posargs} + py.test {posargs: -n 2} --cov=cmd2 --cov-report=term-missing codecov [testenv:py36-win]