Skip to content

Commit

Permalink
Merge pull request #325 from elautz/coverage-null-path
Browse files Browse the repository at this point in the history
Added a null check for the htmlDir in PyCoverageTask
  • Loading branch information
zvezdan authored Dec 5, 2019
2 parents 26c6ba2 + cb03227 commit 90e3f5f
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,10 @@ class PyCoverageTask extends PyTestTask {
String htmlDir = streamProcessor.htmlDir
String coverage = streamProcessor.coverage


FileUtils.copyDirectoryToDirectory(project.file(htmlDir), coverageOutputDir)
// If there is no coverage to report, then the htmlDir value will be empty
if (htmlDir != null) {
FileUtils.copyDirectoryToDirectory(project.file(htmlDir), coverageOutputDir)
}

CoverageXmlReporter coverageXmlReport = new CoverageXmlReporter(coverage)
coverageReport.text = coverageXmlReport.generateXML()
Expand Down

0 comments on commit 90e3f5f

Please sign in to comment.