[Bioc-devel] 3 unit tests skipped for CytoPipeline package on Bioc devel
Martin Morgan
mtmorg@n@xyz @end|ng |rom gm@||@com
Sat Oct 19 19:36:42 CEST 2024
I looked at the first reported skip test-gating.R:42:5 and see https://code.bioconductor.org/browse/CytoPipeline/blob/devel/tests/testthat/test-gating.R#L42. I googled for the help page of `vdiffr::expect_doppelganger` https://vdiffr.r-lib.org/reference/expect_doppelganger.html and saw the `can` argument — the documentation indicates that the test is disabled on ‘CRAN’, but actually testthat relies on an environment variable ’NOT_CRAN’ to be defined for the test to run https://testthat.r-lib.org/reference/skip.html . `devtools::test()` defines this variable, but R CMD check (and hence the Biocondcutor build system) does not, so the test is skipped.
Once the test is skipped on line 42, then all the remaining lines of that `testthat()` expression, including several other calls to `expect_doppelganger()`, are also skipped but silently (the code is never evaluated).
You could add `cran = TRUE` as an argument if you disagree with the arguments on `?expect_doppelganger()` as to why this might be a bad idea.
Martin
> On Oct 17, 2024, at 8:57 AM, Philippe Hauchamps via Bioc-devel <bioc-devel using r-project.org> wrote:
>
> Hi dear members of Bioc-devel community,
>
> Recently I noticed a 'strange' log in the BUILD/CHECK reports of CytoPipeline, one of the package I am currently maintaining, on Bioc-devel:
> https://bioconductor.org/checkResults/devel/bioc-LATEST/CytoPipeline/teran2-checksrc.html
>
> Skipped tests (3)
> On CRAN (3): 'test-gating.R:42:5', 'test-ggplots.R:185:5',
> 'test-ggplots.R:310:5'
>
> [ FAIL 0 | WARN 0 | SKIP 3 | PASS 248 ]
>
> It seems three of my unit tests (using testthat) are skipped, while I can't remember having deactivated any of my tests using testthat.
>
> These 3 tests have something in common, they all use the vdiffr package. However, many other unit tests do also use vdiffr (vdiffr::expect_doppelganger()).
>
> Would you have an clue about what might be happening ?
>
> Thanks a lot,
>
> Best wishes,
>
> Philippe Hauchamps.
>
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> Bioc-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel
[[alternative HTML version deleted]]
More information about the Bioc-devel
mailing list