Closed Max-Bladen closed 2 years ago
@Max-Bladen exact error message matching could be tricky. For instance, there is a typo in the error message which if we fix it only in the function will result in an error here. What you can do instead is give errors classes, and expect the error to have your expected class. See class
arg in tesstthat::expect_error.
Interesting. I'll have a look at this. My work to improve all the test cases (PR #206) is using exact matching for error messages. As I've been implementing it, it did seem a bit haphazard. I'll adjust these to implement the class
system - should make this much more robust
Implemented a check within the
perf.mixo_splsda()
function which prevents the method running if any of the classes have a single sample associated with them.Also added to checks (in new file:
test-perf.mixo_splsda.R
) which ensures basic functionality as well as whether the function prevents a class with one sample being used.