def test_smote_bad_ratio():
 ratio = (-1.0)
 smote = SMOTETomek(ratio=ratio)
 assert_raises(ValueError, smote.fit, X, Y)
 ratio = 100.0
 smote = SMOTETomek(ratio=ratio)
 assert_raises(ValueError, smote.fit, X, Y)
 ratio = 'rnd'
 smote = SMOTETomek(ratio=ratio)
 assert_raises(ValueError, smote.fit, X, Y)
 ratio = [0.5, 0.5]
 smote = SMOTETomek(ratio=ratio)
 assert_raises(ValueError, smote.fit, X, Y)

def test_smote_bad_ratio ( ) : ratio = ( - 1.0 ) smote = SMOTETomek ( ratio = ratio ) assert_raises ( ValueError , smote . fit , X , Y ) ratio = 100.0 smote = SMOTETomek ( ratio = ratio ) assert_raises ( ValueError , smote . fit , X , Y ) ratio = 'rnd' smote = SMOTETomek ( ratio = ratio ) assert_raises ( ValueError , smote . fit , X , Y ) ratio = [ 0.5 , 0.5 ] smote = SMOTETomek ( ratio = ratio ) assert_raises ( ValueError , smote . fit , X , Y )
test either if an error is raised with a wrong decimal value for the ratio .