def test_enn_sample_wrong_X():
 enn = EditedNearestNeighbours(random_state=RND_SEED)
 enn.fit(X, Y)
 assert_raises(RuntimeError, enn.sample, np.random.random((100, 40)), np.array((([0] * 50) + ([1] * 50))))

def test_enn_sample_wrong_X ( ) : enn = EditedNearestNeighbours ( random_state = RND_SEED ) enn . fit ( X , Y ) assert_raises ( RuntimeError , enn . sample , np . random . random ( ( 100 , 40 ) ) , np . array ( ( ( [ 0 ] * 50 ) + ( [ 1 ] * 50 ) ) ) )
test either if an error is raised when x is different at fitting and sampling .