def test_nm3_sample_wt_fit():
 ratio = 'auto'
 nm3 = NearMiss(ratio=ratio, random_state=RND_SEED, version=VERSION_NEARMISS)
 assert_raises(RuntimeError, nm3.sample, X, Y)

def test_nm3_sample_wt_fit ( ) : ratio = 'auto' nm3 = NearMiss ( ratio = ratio , random_state = RND_SEED , version = VERSION_NEARMISS ) assert_raises ( RuntimeError , nm3 . sample , X , Y )
test either if an error is raised when sample is called before fitting .