8000 TST : enable coveralls · matplotlib/matplotlib@c24ecc6 · GitHub
[go: up one dir, main page]

Skip to content

Commit c24ecc6

Browse files
tacaswelljenshnielsen
authored andcommitted
TST : enable coveralls
- also update nose
1 parent 1713368 commit c24ecc6

File tree

3 files changed

+20
-3
lines changed

3 files changed

+20
-3
lines changed

.coveragerc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[run]
2+
source=matplotlib
3+
[report]
4+
omit =
5+
*/python?.?/*
6+
*/site-packages/nose/*
7+
*test*
8+
9+
exclude_lines =
10+
raise NotImplemented

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ install:
6767
pip install $PRE python-dateutil $NUMPY pyparsing pillow sphinx!=1.3.0;
6868
fi
6969
# Always install from pypi
70-
- pip install $PRE nose pep8
70+
- pip install $PRE nose pep8 coveralls coverage
7171

7272
# Install mock on python 2. Python 2.6 requires mock 1.0.1
7373
# Since later versions have dropped support
@@ -170,3 +170,4 @@ after_success:
170170
fi
171171
fi
172172
fi
173+
coveralls

tests.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,20 @@
1919
import nose
2020
from matplotlib.testing.noseclasses import KnownFailure
2121
from matplotlib import default_test_modules
22-
22+
from nose.plugins.cover import Coverage
2323
from matplotlib import font_manager
2424
# Make sure the font caches are created before starting any possibly
2525
# parallel tests
2626
if font_manager._fmcache is not None:
2727
while not os.path.exists(font_manager._fmcache):
2828
time.sleep(0.5)
2929

30+
plugins = [KnownFailure, Coverage]
31+
3032
plugins = [KnownFailure]
33+
env = {"NOSE_WITH_COVERAGE": 1,
34+
'NOSE_COVER_PACKAGE': 'matplotlib',
35+
'NOSE_COVER_HTML': 1}
3136

3237
# Nose doesn't automatically instantiate all of the plugins in the
3338
# child processes, so we have to provide the multiprocess plugin with
@@ -45,7 +50,8 @@ def run():
4550
faulthandler.enable()
4651

4752
nose.main(addplugins=[x() for x in plugins],
48-
defaultTest=default_test_modules)
53+
defaultTest=default_test_modules,
54+
env=env)
4955

5056
if __name__ == '__main__':
5157
if '--no-pep8' in sys.argv:

0 commit comments

Comments
 (0)
0