Open alexpghayes opened 5 years ago
In particular we may want to provide advice on how to test against the Python ecosystem since it's such a nightmare to get that all set up
For yardstick
, I took the approach of saving small output files for later use in tests.
One file generates them, and they just sit in the tests/ folder: https://github.com/tidymodels/yardstick/tree/master/tests/pycompare
I needed a helper for reading in the files so the same path could work interactively and during a CTRL+SHIFT+T test run (testthat changes the path). https://github.com/tidymodels/yardstick/blob/master/tests/testthat/helper-read_pydata.R
And then the actual tests are fairly simple: https://github.com/tidymodels/yardstick/blob/master/tests/testthat/test-class-precision.R#L24
Things that should be included:
Some of this should overlap with the R package book (see related issues https://github.com/hadley/r-pkgs/issues/477, https://github.com/hadley/r-pkgs/issues/481).