def test_iht_sample_wt_fit():
 iht = InstanceHardnessThreshold(ESTIMATOR, random_state=RND_SEED)
 assert_raises(RuntimeError, iht.sample, X, Y)

def test_iht_sample_wt_fit ( ) : iht = InstanceHardnessThreshold ( ESTIMATOR , random_state = RND_SEED ) assert_raises ( RuntimeError , iht . sample , X , Y )
test either if an error is raised when sample is called before fitting .