From e5cf5508242c9b1d2bfec19478e5cdfe3c2e02fc Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Wed, 22 Apr 2015 01:26:10 -0400 Subject: [PATCH] TST : enable coveralls - also update nose --- .coveragerc | 10 ++++++++++ .travis.yml | 3 ++- tests.py | 8 ++++++-- 3 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 .coveragerc diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 000000000000..c4477f170148 --- /dev/null +++ b/.coveragerc @@ -0,0 +1,10 @@ +[run] +source=matplotlib +[report] +omit = + */python?.?/* + */site-packages/nose/* + *test* + +exclude_lines = + raise NotImplemented diff --git a/.travis.yml b/.travis.yml index 47931f7680ff..825a2be6d8b5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -67,7 +67,7 @@ install: pip install $PRE python-dateutil $NUMPY pyparsing!=2.0.4 pillow sphinx!=1.3.0; fi # Always install from pypi - - pip install $PRE pep8 cycler + - pip install $PRE pep8 cycler coveralls coverage - 'pip install https://github.com/tacaswell/nose/zipball/mnt_py36_compat#egg=nose' # We manually install humor sans using the package from Ubuntu 14.10. Unfortunatly humor sans is not @@ -165,3 +165,4 @@ after_success: fi fi fi + coveralls diff --git a/tests.py b/tests.py index 529dbe70d112..a0a428d22660 100755 --- a/tests.py +++ b/tests.py @@ -23,6 +23,10 @@ def run(extra_args): from nose.plugins import multiprocess + env = {"NOSE_WITH_COVERAGE": 1, + 'NOSE_COVER_PACKAGE': 'matplotlib', + 'NOSE_COVER_HTML': 1} + matplotlib._init_tests() # Nose doesn't automatically instantiate all of the plugins in the @@ -33,8 +37,8 @@ def run(extra_args): nose.main(addplugins=[x() for x in plugins], defaultTest=default_test_modules, - argv=sys.argv + extra_args) - + argv=sys.argv + extra_args, + env=env) if __name__ == '__main__': extra_args = []