def test_tl_fit_single_class():
 tl = TomekLinks(random_state=RND_SEED)
 y_single_class = np.zeros((X.shape[0],))
 assert_warns(UserWarning, tl.fit, X, y_single_class)

def test_tl_fit_single_class ( ) : tl = TomekLinks ( random_state = RND_SEED ) y_single_class = np . zeros ( ( X . shape [ 0 ] , ) ) assert_warns ( UserWarning , tl . fit , X , y_single_class )
test either if an error when there is a single class .