def test_allknn_sample_wt_fit():
 allknn = AllKNN(random_state=RND_SEED)
 assert_raises(RuntimeError, allknn.sample, X, Y)

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