scikit-learn-contrib / lightning

Large-scale linear classification, regression and ranking in Python
https://contrib.scikit-learn.org/lightning/
1.72k stars 214 forks source link

Refactor tests to use pytest features #193

Closed StrikerRUS closed 2 years ago

StrikerRUS commented 2 years ago

Use pytest fixtures to parametrize existing tests. It allows to remove duplicated code (mainly, dataset generations), speed up tests, increase code readability. Also it improves test logs readability (see screenshot below), note additional square brackets in a test title.

image

Sorry, this PR looks quite huge for review, but you can hide whitespace changes and leave only meaningful ones (they are all similar across files).

image