summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2017-07-02 21:58:45 -0400
committerGitHub <noreply@github.com>2017-07-02 21:58:45 -0400
commit936e6568f86270b5d2da32abb4944e63f9c8d269 (patch)
treeccd34f0ee84f680e85531f4852730fa6d4c30b33
parent7dd5db1761d3e223e87652cadcab8226d5418cd5 (diff)
parent6b0a8d82db3a848d5316be6de2fb3fa2127a046a (diff)
downloadcmd2-git-936e6568f86270b5d2da32abb4944e63f9c8d269.tar.gz
Merge pull request #167 from python-cmd2/cov_xdist
pytest-cov and pytest-xdist now play nicely together
-rw-r--r--.coveragerc2
-rw-r--r--tox.ini11
2 files changed, 11 insertions, 2 deletions
diff --git a/.coveragerc b/.coveragerc
index bdd0ee85..a50fe0e7 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 946f2136..1a7e2687 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]