def test_wrong_nn():
 kind = 'borderline1'
 nn_m = 'rnd'
 nn_k = NearestNeighbors(n_neighbors=6)
 smote = SMOTE(random_state=RND_SEED, kind=kind, k_neighbors=nn_k, m_neighbors=nn_m)
 assert_raises(ValueError, smote.fit_sample, X, Y)
 nn_k = 'rnd'
 nn_m = NearestNeighbors(n_neighbors=10)
 smote = SMOTE(random_state=RND_SEED, kind=kind, k_neighbors=nn_k, m_neighbors=nn_m)
 assert_raises(ValueError, smote.fit_sample, X, Y)
 kind = 'regular'
 nn_k = 'rnd'
 smote = SMOTE(random_state=RND_SEED, kind=kind, k_neighbors=nn_k)
 assert_raises(ValueError, smote.fit_sample, X, Y)

def test_wrong_nn ( ) : kind = 'borderline1' nn_m = 'rnd' nn_k = NearestNeighbors ( n_neighbors = 6 ) smote = SMOTE ( random_state = RND_SEED , kind = kind , k_neighbors = nn_k , m_neighbors = nn_m ) assert_raises ( ValueError , smote . fit_sample , X , Y ) nn_k = 'rnd' nn_m = NearestNeighbors ( n_neighbors = 10 ) smote = SMOTE ( random_state = RND_SEED , kind = kind , k_neighbors = nn_k , m_neighbors = nn_m ) assert_raises ( ValueError , smote . fit_sample , X , Y ) kind = 'regular' nn_k = 'rnd' smote = SMOTE ( random_state = RND_SEED , kind = kind , k_neighbors = nn_k ) assert_raises ( ValueError , smote . fit_sample , X , Y )
test either if an error is raised while passing a wrong nn object .