#NEWLINE# def test_ovr_gridsearch( ) : #NEWLINE# #INDENT# ovr = OneVsRestClassifier ( LinearSVC ( random_state = 0 ) ) #NEWLINE# Cs = [ 0.1 , 0.5 , 0.8 ] #NEWLINE# cv = GridSearchCV ( ovr , { #NEWLINE# #INDENT# 'estimator__C' : Cs , #NEWLINE# #UNINDENT# } ) #NEWLINE# cv . fit ( iris . data , iris . target ) #NEWLINE# best_C = cv . best_estimator_ . estimators_ [ 0 ] . C #NEWLINE# assert_true ( ( best_C in Cs ) )