mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-27 04:20:22 +08:00
enable test coverage on coveralls
This commit is contained in:
parent
b894612b4d
commit
df6744d85d
@ -636,7 +636,7 @@ def run_iptestall(options):
|
|||||||
print()
|
print()
|
||||||
|
|
||||||
if options.coverage:
|
if options.coverage:
|
||||||
from coverage import coverage
|
from coverage import coverage, CoverageException
|
||||||
cov = coverage(data_file='.coverage')
|
cov = coverage(data_file='.coverage')
|
||||||
cov.combine()
|
cov.combine()
|
||||||
cov.save()
|
cov.save()
|
||||||
@ -671,7 +671,10 @@ def run_iptestall(options):
|
|||||||
|
|
||||||
# Coverage XML report
|
# Coverage XML report
|
||||||
elif options.coverage == 'xml':
|
elif options.coverage == 'xml':
|
||||||
cov.xml_report(outfile='ipy_coverage.xml')
|
try:
|
||||||
|
cov.xml_report(outfile='ipy_coverage.xml')
|
||||||
|
except CoverageException:
|
||||||
|
pass
|
||||||
|
|
||||||
if failed:
|
if failed:
|
||||||
# Ensure that our exit code indicates failure
|
# Ensure that our exit code indicates failure
|
||||||
|
Loading…
Reference in New Issue
Block a user