R测试通过但是covr失败了

时间:2018-06-11 18:00:25

标签: r unit-testing testing testthat covr

我遇到问题covr R包 - covr::codecov()失败,即使所有测试都使用devtools::test()传递:

> devtools::test()
Loading cachemeR
Testing cachemeR
✔ | OK F W S | Context
✔ |  6       | getArgs()
✔ |  5       | pipe output
✔ | 14       | test R6 object and methods

══ Results ════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Duration: 0.2 s

OK:       25
Failed:   0
Warnings: 0
Skipped:  0
> covr::codecov()
BŁĄD: Failure in `/private/var/folders/bh/m7vk09j54m1gmmxkgsdb5r0w0000gn/T/RtmpgSoSo2/R_LIBS11d695240a85c/cachemeR/cachemeR-tests/testthat.Rout.fail`
> library(testthat)
> library(cachemeR)
Loading required package: R6
Loading required package: futile.logger
> 
> test_check("cachemeR")
INFO [2018-06-11 19:55:14] Caching 'testFun' for first time...
INFO [2018-06-11 19:55:14] Caching 'testFun' for first time...
INFO [2018-06-11 19:55:14] 'testFun' is already cached...
INFO [2018-06-11 19:55:14] Caching 'testFun' for first time...
INFO [2018-06-11 19:55:14] Caching 'testFun' for first time...
── 1. Failure: method: lastCache (@test_02-cache.R#60)  ───────────────────────────────────────────────────────────────────────────
"c3783d8b264c9c5addfb001af37976f8" not equal to cache$lastCache$hashes$fun.body.
1/1

要重现,请克隆我的回购:

git clone -b devel https://github.com/Tazovsky/cachemeR
cd cachemeR
git checkout 2057e7cd88fcb6fa152806cb7aec5cc1282005e5

covr失败的任何想法?

0 个答案:

没有答案