def test_tl_sample_wt_fit():
 tl = TomekLinks(random_state=RND_SEED)
 assert_raises(RuntimeError, tl.sample, X, Y)

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