ropensci / tidyqpcr

quantitative PCR analysis in the tidyverse
https://docs.ropensci.org/tidyqpcr/
Other
50 stars 18 forks source link

Clean up tests #180

Closed ewallace closed 2 years ago

ewallace commented 2 years ago

From https://github.com/ropensci/software-review/issues/470#issuecomment-1145867283

Tests

  • In test-calculate_efficiency.R, I think that wrapping the function call on line 29 in suppressWarnings() would help with the interpretation of the tests here. Otherwise you get two warnings, but the warnings are not related to the test results and this could be confusing to the tester.

  • label_plate_rowcol() - is not actually tested with a plate with well_col or well_row that are not factors. Do you think it would be important to test this? (This is not facetious or sarcastic comment, just genuinely thinking about it)

The second point could be addressed alongside:

  • (optional) The label_plate_rowcol() test has cases that don't throw warnings, maybe at some point it could be helpful to add to the examples because to clarify how users could construct their plates.
ewallace commented 2 years ago

I addressed this in #185.

Adding examples for label_plate_rowcol() including factor coercion gives the user the chance to understand that works, and illustrates the points in the documentation. Those examples are also run during package checking.

We have 3 tests of label_plate_rowcol(). Edited so one coerces neither, one coerces only rows, one coerces only columns.