| Index: expect_tests/cover.py
|
| diff --git a/expect_tests/cover.py b/expect_tests/cover.py
|
| index dee4f16a05cc3991720c38573f112a368a33d670..2cfe6968434739a5ca31a2c9a4b6b293bbfcc1db 100644
|
| --- a/expect_tests/cover.py
|
| +++ b/expect_tests/cover.py
|
| @@ -110,7 +110,16 @@ class CoverageContext(object):
|
| self.cov.html_report(directory=self.html_report)
|
|
|
| outf = StringIO()
|
| - coverage_percent = self.cov.report(file=outf, show_missing=True)
|
| +
|
| + try:
|
| + coverage_percent = self.cov.report(file=outf, show_missing=True)
|
| + except CoverageException as ce:
|
| + # If we have no data to report, this means that coverage has found no
|
| + # tests in the module. This is not nice, but we shouldn't fail.
|
| + if ce.message == 'No data to report.':
|
| + return
|
| + raise
|
| +
|
| fail = coverage_percent < self.expected_coverage_min
|
| summary = outf.getvalue().replace('%- 15s' % 'Name', 'Coverage Report', 1)
|
| if verbose:
|
|
|