[英]covr shows 0% of coverage while all tests with testthat pass
I have built a package with unit tests for most of the functions. 我为大多数功能构建了带有单元测试的软件包。 The package has a standard structure:
该软件包具有标准结构:
package:
- R/
- file1.R
- file2.R
- ...
- tests/
- testthat/
- tests_for_file1.R
- tests_for_file2.R
- ...
- ...
Calling a function devtools::check()
in R console gives me no errors 在R控制台中调用函数
devtools::check()
不会给我任何错误
R CMD check results
0 errors | 1 warning | 1 note
Calling a function devtools::test()
is also successful 调用函数
devtools::test()
也成功
OK: 72
Failed: 0
Warnings: 0
Skipped: 0
However covr::package_coverage()
give me this result 但是
covr::package_coverage()
给我这个结果
package Coverage: 0.00%
R/file1.R: 0.00%
R/file2.R: 0.00%
...
Why? 为什么?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.