def test_nm3_wrong_nn_obj():
 ratio = 'auto'
 nn = 'rnd'
 nn3 = NearestNeighbors(n_neighbors=3)
 nm3 = NearMiss(ratio=ratio, random_state=RND_SEED, version=VERSION_NEARMISS, return_indices=True, n_neighbors=nn, n_neighbors_ver3=nn3)
 assert_raises(ValueError, nm3.fit_sample, X, Y)
 nn3 = 'rnd'
 nn = NearestNeighbors(n_neighbors=3)
 nm3 = NearMiss(ratio=ratio, random_state=RND_SEED, version=VERSION_NEARMISS, return_indices=True, n_neighbors=nn, n_neighbors_ver3=nn3)
 assert_raises(ValueError, nm3.fit_sample, X, Y)

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