Skip to content

Commit

Permalink
Add check_no_attributes_set_in_init check
Browse files Browse the repository at this point in the history
  • Loading branch information
timokau committed Aug 24, 2020
1 parent db00895 commit 4c637b5
Showing 1 changed file with 30 additions and 28 deletions.
58 changes: 30 additions & 28 deletions csrank/tests/test_estimators.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import pytest
from sklearn.utils.estimator_checks import check_parameters_default_constructible
from sklearn.utils.estimator_checks import check_no_attributes_set_in_init

from csrank.choicefunction import CmpNetChoiceFunction
from csrank.choicefunction import FATEChoiceFunction
Expand Down Expand Up @@ -41,35 +42,36 @@
"Estimator",
[
CmpNet,
CmpNetChoiceFunction,
CmpNetDiscreteChoiceFunction,
ExpectedRankRegression,
FATEChoiceFunction,
FATEDiscreteChoiceFunction,
FATELinearChoiceFunction,
FATELinearDiscreteChoiceFunction,
FATELinearObjectRanker,
FATEObjectRanker,
FETAChoiceFunction,
FETADiscreteChoiceFunction,
FETALinearChoiceFunction,
FETALinearDiscreteChoiceFunction,
FETALinearObjectRanker,
FETAObjectRanker,
GeneralizedLinearModel,
GeneralizedNestedLogitModel,
ListNet,
MixedLogitModel,
MultinomialLogitModel,
NestedLogitModel,
PairedCombinatorialLogit,
PairwiseSVMChoiceFunction,
PairwiseSVMDiscreteChoiceFunction,
RankNet,
RankNetChoiceFunction,
RankNetDiscreteChoiceFunction,
RankSVM,
# CmpNetChoiceFunction,
# CmpNetDiscreteChoiceFunction,
# ExpectedRankRegression,
# FATEChoiceFunction,
# FATEDiscreteChoiceFunction,
# FATELinearChoiceFunction,
# FATELinearDiscreteChoiceFunction,
# FATELinearObjectRanker,
# FATEObjectRanker,
# FETAChoiceFunction,
# FETADiscreteChoiceFunction,
# FETALinearChoiceFunction,
# FETALinearDiscreteChoiceFunction,
# FETALinearObjectRanker,
# FETAObjectRanker,
# GeneralizedLinearModel,
# GeneralizedNestedLogitModel,
# ListNet,
# MixedLogitModel,
# MultinomialLogitModel,
# NestedLogitModel,
# PairedCombinatorialLogit,
# PairwiseSVMChoiceFunction,
# PairwiseSVMDiscreteChoiceFunction,
# RankNet,
# RankNetChoiceFunction,
# RankNetDiscreteChoiceFunction,
# RankSVM,
],
)
def test_all_estimators(Estimator):
check_parameters_default_constructible("default_constructible", Estimator)
check_no_attributes_set_in_init("no_attributes_set_in_init", Estimator())

0 comments on commit 4c637b5

Please sign in to comment.