def test_ncr_wrong_nn_obj():
 nn = 'rnd'
 ncr = NeighbourhoodCleaningRule(return_indices=True, random_state=RND_SEED, n_neighbors=nn)
 assert_raises(ValueError, ncr.fit_sample, X, Y)

def test_ncr_wrong_nn_obj ( ) : nn = 'rnd' ncr = NeighbourhoodCleaningRule ( return_indices = True , random_state = RND_SEED , n_neighbors = nn ) assert_raises ( ValueError , ncr . fit_sample , X , Y )
test either if an error is raised with wrong nn object .