caret icon indicating copy to clipboard operation
caret copied to clipboard

Add regression tests for createDataPartition()

Open MichaelChirico opened this issue 10 months ago • 0 comments

Created as a confidence booster for the refactor in #1382.

Note the added input validation for numeric y -- currently, createDataPartition() will error from quantile() when passed missing values. See also #1384.

This started as a suite generated by Gemini -- I prompted it for a test suite, then cleaned up a few stale usage patterns, ran the tests and iterated until the HEAD behavior passes the suite. However, I did not find it very satisfactory -- it seems wary of the random nature of the output & unwililng to put some actually useful tests in place, despite the use of local_seed(). So, I mostly stripped out all the crufty tests it wrote and replaced them with expect_identical() tests of the createDataPartition() output.

MichaelChirico avatar May 29 '25 00:05 MichaelChirico