From df6744d85d324740bdf7307171cb3e1fda2052b5 Mon Sep 17 00:00:00 2001 From: Matthias Bussonnier Date: Sat, 13 Dec 2014 23:07:52 +0100 Subject: [PATCH] enable test coverage on coveralls --- IPython/testing/iptestcontroller.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/IPython/testing/iptestcontroller.py b/IPython/testing/iptestcontroller.py index 81da35f91..6c17bc9dd 100644 --- a/IPython/testing/iptestcontroller.py +++ b/IPython/testing/iptestcontroller.py @@ -636,7 +636,7 @@ def run_iptestall(options): print() if options.coverage: - from coverage import coverage + from coverage import coverage, CoverageException cov = coverage(data_file='.coverage') cov.combine() cov.save() @@ -671,7 +671,10 @@ def run_iptestall(options): # Coverage XML report elif options.coverage == 'xml': - cov.xml_report(outfile='ipy_coverage.xml') + try: + cov.xml_report(outfile='ipy_coverage.xml') + except CoverageException: + pass if failed: # Ensure that our exit code indicates failure