def test_nm1_wrong_nn_obj():
 ratio = 'auto'
 nn = 'rnd'
 nm1 = NearMiss(ratio=ratio, random_state=RND_SEED, version=VERSION_NEARMISS, return_indices=True, n_neighbors=nn)
 assert_raises(ValueError, nm1.fit_sample, X, Y)

def test_nm1_wrong_nn_obj ( ) : ratio = 'auto' nn = 'rnd' nm1 = NearMiss ( ratio = ratio , random_state = RND_SEED , version = VERSION_NEARMISS , return_indices = True , n_neighbors = nn ) assert_raises ( ValueError , nm1 . fit_sample , X , Y )
test either if an error is raised with wrong nn object .