phuse-org / valtools

Validation framework for R packages used in clinical research and drug development.
https://phuse-org.github.io/valtools/
Other
51 stars 10 forks source link

why does test code result table use inconsistent numbering ? #150

Closed mariev closed 3 years ago

mariev commented 3 years ago

via function valtools:::eval_test_code , test ids are numbered using X.Y.Z, where position "Z" is auto-generated. However if there is only one sub test in "X.Y", i.e. only one instance of expect_* in test_that(..) {valtools} drops the "Z" position. Can we switch to using nomenclature X.Y.Z for all tests evaluated?

Due to code at:

https://github.com/phuse-org/valtools/blob/3b844a532cd87023d2e128bc136a6facb6cf513c/R/evaluate_test_code.R#L130-L135

thebioengineer commented 3 years ago

🤔 totally reasonable - I don't recall my reasoning behind breaking it out like that. I think it is because the assumption that the test case was written such that there were no sub numbering.