def test_make_imbalance_bad_ratio():
 min_c_ = 1
 ratio = 0.0
 assert_raises(ValueError, make_imbalance, X, Y, ratio, min_c_)
 ratio = (-2.0)
 assert_raises(ValueError, make_imbalance, X, Y, ratio, min_c_)
 ratio = 2.0
 assert_raises(ValueError, make_imbalance, X, Y, ratio, min_c_)
 ratio = [0.5, 0.5]
 assert_raises(ValueError, make_imbalance, X, Y, ratio, min_c_)

def test_make_imbalance_bad_ratio ( ) : min_c_ = 1 ratio = 0.0 assert_raises ( ValueError , make_imbalance , X , Y , ratio , min_c_ ) ratio = ( - 2.0 ) assert_raises ( ValueError , make_imbalance , X , Y , ratio , min_c_ ) ratio = 2.0 assert_raises ( ValueError , make_imbalance , X , Y , ratio , min_c_ ) ratio = [ 0.5 , 0.5 ] assert_raises ( ValueError , make_imbalance , X , Y , ratio , min_c_ )
test either if an error is raised with bad ratio argument .