(WIP) use rstest to parameterize test cases#3100
(WIP) use rstest to parameterize test cases#3100neunenak wants to merge 3 commits intocasey:masterfrom
Conversation
|
@casey curious what you think of this - I noticed in the process of working on #2426 that |
|
I'm pretty ambivalent about this. I think the rstest code is pretty hard to read. It would be far better to just somehow generate sub-tests inside an existing tests, but rust doesn't support that. As it is, I'd probably not merge this. The savings seem okay, but it introduces a new dependency and makes the tests weird. If a whole lot more deduplication was possible, I'd be more inclined to add it. |
I think there's more opportunity for deduplication than the relatively limited amount that's happening here for the sake of a smaller PR, but yeah I can see how Maybe there's a way to extend the existing Another idea is to modify the |
|
Extending the |
Introduce rstest as a dev-dependency, use it to parameterize a number of near-identical test cases in
tests/functions.rs