-
- Downloads
[MRG+1] Instance level common tests (#9019)
* start work on separating instance-level tests * minor refactoring / fixes to work without tags * add clone into check_supervised_y_2d estimator check (which made other checks fail) * remove duplicate check_estimator_unfitted assert * add issue reference to whatsnew entry * added some clones, minor fixes from vene's review * rename estimator arg to estimator_org to make a visible distinction before and after cloning. * more renaming for more explicit clones * org -> orig * allclose, fix orig stuff * don't use set_testing_parameters in the checks! * minor fixes for allclose * fix some test, add more tests on classes * added the test using pickles. * move assert_almost_equal_dense_sparse to utils.testing, rename to assert_allclose_sparse_dense, test it * make assert_allclose_dense_sparse more stringent * more allclose fixes * run test_check_estimator on all estimators * rename set_testing_parameters to set_checking_parameters so nose doesn't think it's a tests (and I don't want to import stuff from nose as we want to remove it) * fix in set_checking_parameters so that common tests pass * more fixes to assert_allclose_dense_sparse * rename alg to clusterer, don't scream even though I really want to * ok this is not a pretty strict test that runs check_estimator with and without fitting on an instance. I also check if ``fit`` is called on the instance that is passed. * simplify test as they didn't help at all * it works!!! omfg * run check_estimator clone test only on one of the configs, don't run locally by default * Add `slow_test` decorator and documentation * run test_check_estimator only on some estimators * fix diags in test for older scipy * fix pep8 and shorten * use joblib.hash for inequality check because the pickle state machine is weird
Showing
- doc/whats_new.rst 5 additions, 0 deletionsdoc/whats_new.rst
- sklearn/tests/test_common.py 10 additions, 2 deletionssklearn/tests/test_common.py
- sklearn/utils/estimator_checks.py 263 additions, 269 deletionssklearn/utils/estimator_checks.py
- sklearn/utils/testing.py 33 additions, 0 deletionssklearn/utils/testing.py
- sklearn/utils/tests/test_estimator_checks.py 49 additions, 6 deletionssklearn/utils/tests/test_estimator_checks.py
- sklearn/utils/tests/test_testing.py 24 additions, 1 deletionsklearn/utils/tests/test_testing.py
Loading
Please register or sign in to comment