8000 FIX/TST remove ExtraTree from test · scikit-learn/scikit-learn@225995f · GitHub
[go: up one dir, main page]

Skip to content

Commit 225995f

Browse files
author
Guillaume Lemaitre
committed
FIX/TST remove ExtraTree from test
1 parent e02f957 commit 225995f

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

sklearn/tree/tests/test_tree.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1191,10 +1191,12 @@ def test_behaviour_constant_feature_after_splits():
11911191
np.zeros((4, 11)))))
11921192
y = [0, 0, 0, 1, 1, 2, 2, 2, 3, 3, 3]
11931193
for name, TreeEstimator in ALL_TREES.items():
1194-
est = TreeEstimator(random_state=0, max_features=1)
1195-
est.fit(X, y)
1196-
assert_equal(est.tree_.max_depth, 2)
1197-
assert_equal(est.tree_.node_count, 5)
1194+
# do not check extra random trees
1195+
if not "ExtraTree" in name:
1196+
est = TreeEstimator(random_state=0, max_features=1)
1197+
est.fit(X, y)
1198+
assert_equal(est.tree_.max_depth, 2)
1199+
assert_equal(est.tree_.node_count, 5)
11981200

11991201

12001202
def test_with_only_one_non_constant_features():

0 commit comments

Comments
 (0)
0