Skip to content

Commit 9183df6

Browse files
committed
Attempt to speedup unit tests
Now that we have a lot of unit tests and are running code coverage analysis, our unit tests take a long time to run. Changes include ... tox: - Install pytest-xdist to parallelize unit tests - Only run code coverage analysis on Python 2.7 and 3.6 - Don't run examples/example.py anymore, just run the unit tests TravisCI: - Stop building on Python 3.7-dev since that won't be released for some time AppVeyor: - Stop building on Python 3.4 since that isn't as important and is covered by Travis
1 parent 29578be commit 9183df6

3 files changed

Lines changed: 29 additions & 8 deletions

File tree

.appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ install:
44
build: off
55

66
test_script:
7-
- python -m tox -e py27,py34,py35,py36
7+
- python -m tox -e py27,py35,py36

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ matrix:
1919
- os: linux
2020
python: 3.6
2121
env: TOXENV=py36
22-
- os: linux
23-
python: 3.7-dev
24-
env: TOXENV=py37
22+
# - os: linux
23+
# python: 3.7-dev
24+
# env: TOXENV=py37
2525
# # Warning: Don't try to use code coverage analysis with pypy as it is insanely slow
2626
# - os: linux
2727
# python: pypy

tox.ini

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py27,py34,py35,py36,jython,pypy
2+
envlist = py27,py33,py34,py35,py36,py37,pypy
33

44
[testenv]
55
passenv = CI TRAVIS TRAVIS_* APPVEYOR*
@@ -10,9 +10,30 @@ deps =
1010
pyperclip
1111
pytest
1212
pytest-cov
13+
pytest-xdist
1314
six
14-
commands=
15-
py.test -v --cov=cmd2 --basetemp={envtmpdir} {posargs}
16-
{envpython} examples/example.py --test examples/exampleSession.txt
15+
16+
[testenv:py27]
17+
commands =
18+
codecov erase
19+
py.test -v -n2 --cov=cmd2 --basetemp={envtmpdir} {posargs}
1720
codecov
1821

22+
[testenv:py33]
23+
commands = py.test -v -n2
24+
25+
[testenv:py34]
26+
commands = py.test -v -n2
27+
28+
[testenv:py35]
29+
commands = py.test -v -n2
30+
31+
[testenv:py36]
32+
commands =
33+
codecov erase
34+
py.test -v -n2 --cov=cmd2 --basetemp={envtmpdir} {posargs}
35+
codecov
36+
37+
[testenv:py37]
38+
commands = py.test -v -n2
39+

0 commit comments

Comments
 (0)