def test_nm_fit_invalid_ratio():
 ratio = (1.0 / 10000.0)
 nm = NearMiss(ratio=ratio, random_state=RND_SEED)
 assert_raises(RuntimeError, nm.fit, X, Y)

def test_nm_fit_invalid_ratio ( ) : ratio = ( 1.0 / 10000.0 ) nm = NearMiss ( ratio = ratio , random_state = RND_SEED ) assert_raises ( RuntimeError , nm . fit , X , Y )
test either if an error is raised when the balancing ratio to fit is smaller than the one of the data .