Fix exclusion of tests directories from coverage reports
Merge pull request #5239 from takluyver/coverage-exclude-tests

Fix exclusion of tests directories from coverage reports