def test_enn_sample_wt_fit():
 enn = EditedNearestNeighbours(random_state=RND_SEED)
 assert_raises(RuntimeError, enn.sample, X, Y)

def test_enn_sample_wt_fit ( ) : enn = EditedNearestNeighbours ( random_state = RND_SEED ) assert_raises ( RuntimeError , enn . sample , X , Y )
test either if an error is raised when sample is called before fitting .