Skip to content

Commit 936e656

Browse files
authored
Merge pull request #167 from python-cmd2/cov_xdist
pytest-cov and pytest-xdist now play nicely together
2 parents 7dd5db1 + 6b0a8d8 commit 936e656

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

.coveragerc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# .coveragerc to control coverage.py
22
[run]
3+
# Source
4+
source = cmd2.py
35
# (boolean, default False): whether to measure branch coverage in addition to statement coverage.
46
branch = False
57

tox.ini

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
[tox]
22
envlist = py27,py33,py34,py35,py36,py36-winpy37,pypy
33

4+
[pytest]
5+
testpaths = tests
6+
47
[testenv]
58
passenv = CI TRAVIS TRAVIS_* APPVEYOR*
9+
setenv =
10+
PYTHONPATH={toxinidir}
611

712
[testenv:py27]
813
deps =
@@ -12,9 +17,10 @@ deps =
1217
pyperclip
1318
pytest
1419
pytest-cov
20+
pytest-xdist
1521
six
1622
commands =
17-
py.test -v --cov=cmd2 --basetemp={envtmpdir} {posargs}
23+
py.test {posargs: -n 2} --cov=cmd2 --cov-report=term-missing
1824
codecov
1925

2026
[testenv:py33]
@@ -55,9 +61,10 @@ deps =
5561
pyperclip
5662
pytest
5763
pytest-cov
64+
pytest-xdist
5865
six
5966
commands =
60-
py.test -v --cov=cmd2 --basetemp={envtmpdir} {posargs}
67+
py.test {posargs: -n 2} --cov=cmd2 --cov-report=term-missing
6168
codecov
6269

6370
[testenv:py36-win]

0 commit comments

Comments
 (0)