def test_rus_fit():
 rus = RandomUnderSampler(random_state=RND_SEED)
 rus.fit(X, Y)
 assert_equal(rus.min_c_, 0)
 assert_equal(rus.maj_c_, 1)
 assert_equal(rus.stats_c_[0], 3)
 assert_equal(rus.stats_c_[1], 7)

def test_rus_fit ( ) : rus = RandomUnderSampler ( random_state = RND_SEED ) rus . fit ( X , Y ) assert_equal ( rus . min_c_ , 0 ) assert_equal ( rus . maj_c_ , 1 ) assert_equal ( rus . stats_c_ [ 0 ] , 3 ) assert_equal ( rus . stats_c_ [ 1 ] , 7 )
test the fitting method .