Hi Martin,

Thanks a lot for your thorough answer, this is now crystal clear 😊
And indeed, deactivating vdiffr::expect_doppelganger() as a default – outside 
local and GHA unit testing – is a good idea, as these tests regularly issue 
false positives.

Have a nice day,

Philippe

De : Martin Morgan <mtmorgan....@gmail.com>
Envoyé : 19 October 2024 19:37
À : Philippe Hauchamps <philippe.haucha...@uclouvain.be>
Cc : bioc-devel@r-project.org
Objet : Re: [Bioc-devel] 3 unit tests skipped for CytoPipeline package on Bioc 
devel

Vous n’obtenez pas souvent d’e-mail à partir de 
mtmorgan....@gmail.com<mailto:mtmorgan....@gmail.com>. Pourquoi c’est 
important<https://aka.ms/LearnAboutSenderIdentification>
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@r-project.org<mailto:bioc-devel@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@r-project.org<mailto:Bioc-devel@r-project.org> mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel


        [[alternative HTML version deleted]]

_______________________________________________
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel

Reply via email to