covr icon indicating copy to clipboard operation
covr copied to clipboard

Code coverage test fails on Windows while it works on Mac OS X

Open schaffstein opened this issue 5 years ago • 3 comments

I am struggling with a code coverage test (using covr 3.4.0) on a windows machine (Windows 10 Enterprise; R 3.6.2). To verify the behaviour I wrote a very basic package with just one hello() function and a testthat-test covering exactly this function. I run the test with the following code:

library(covr)
cov <- covr::package_coverage(quiet = FALSE, clean = FALSE)

On the windows machine it returns the following error:

Running specific tests for package ‘dummyTestthat’
  Running ‘testthat.R’
Warnmeldung:
In structure(c(coverage, res), class = "coverage", package = pkg,  :
  Calling 'structure(NULL, *)' is deprecated, as NULL cannot have attributes.
  Consider 'structure(list(), *)' instead.

Running the exact same script on my Mac OS X machine (R 3.6.2) works nicely and returns a test coverage value of 100% (which is correct).

Do you have any idea what's failing on the windows machine? (If it helps, I'll happily supply you with my dummy package.)

schaffstein avatar Jan 23 '20 13:01 schaffstein

I think likely it is failing before this warning, but don't have enough information here to determine exactly why.

jimhester avatar Mar 06 '20 16:03 jimhester

Which information can I supply to help you identify the problem? I'd be happy to give you all the details...

schaffstein avatar Mar 09 '20 08:03 schaffstein

You would likely need to provide an example package that exhibits this behavior for me to reproduce it.

jimhester avatar Apr 03 '20 13:04 jimhester