Skip to content

Commit

Permalink
Fix to work with python-coverage version 4
Browse files Browse the repository at this point in the history
  • Loading branch information
benmwebb committed Apr 7, 2020
1 parent d8ccbf9 commit d28c162
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/run-all-tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@ def runTests(self):
self.cov.use_cache(False)
print("\nPython coverage report\n", file=sys.stderr)

self.cov.file_locator.relative_dir = self.topdir + '/'
# Don't show full paths in coverage output
if hasattr(coverage.files, 'RELATIVE_DIR'):
coverage.files.RELATIVE_DIR = self.topdir + '/'
else:
self.cov.file_locator.relative_dir = self.topdir + '/'
self.cov.report(self.mods, file=sys.stderr)
html = self.opts.html_coverage
if html:
Expand Down

0 comments on commit d28c162

Please sign in to comment.