

def check_classes_shape(name):
    ForestClassifier = FOREST_CLASSIFIERS[name]
    clf = ForestClassifier(random_state=0).fit(X, y)
    assert_equal(clf.n_classes_, 2)
    assert_array_equal(clf.classes_, [(- 1), 1])
    _y = np.vstack((y, (np.array(y) * 2))).T
    clf = ForestClassifier(random_state=0).fit(X, _y)
    assert_array_equal(clf.n_classes_, [2, 2])
    assert_array_equal(clf.classes_, [[(- 1), 1], [(- 2), 2]])

dataset/ETHPy150Open scikit-learn/scikit-learn/sklearn/ensemble/tests/test_forest.py check_classes_shape/original