-
Notifications
You must be signed in to change notification settings - Fork 402
Closed
Labels
Description
I was thinking about applying data driven testing (ddt).
Why ddt:
test_encoders
contains a lot of copy-pasted codetest_estimators
already loops over all encoders- ddt, in comparison to a simple loop, does not stop on the first error (unless you tell it to do so) and reports results for each subtest (not just for the whole loop)
- ddt makes it easy to quickly increase test coverage
- ddt makes it easy to test that all encoders in the library fulfill some basic requirements
But of course, there are disadvantages:
- It makes it slightly harder to understand and write tests
- I have encountered behaviors (two, to be exact) that could be considered valid but break uniform behaviour of the library. I do not know what to do - adjust the tests or the encoders?
Example of the code.
Questions:
- Should I continue in the effort to port portable tests under ddt while preserving the encoder specific tests?
- If yes, is it ok to make a branch instead of a pull request? I hope it is going to be easier (for me) to maintain synchronicity between the development and master branch.