TST/FIX failure on machines with one CPU
@@ -19,6 +19,7 @@ from sklearn.datasets import fetch_mldata
from sklearn.datasets import make_classification
from sklearn.ensemble import GradientBoostingRegressor, RandomForestClassifier
from sklearn.exceptions import NotFittedError
+from sklearn.externals.joblib import cpu_count
from sklearn.linear_model import Lasso
from sklearn.linear_model import LogisticRegression
from sklearn.linear_model import SGDClassifier
@@ -167,6 +168,7 @@ def test_multi_output_classification_partial_fit_parallelism():
est1 = mor.estimators_[0]
mor.partial_fit(X, y)
est2 = mor.estimators_[0]
+ if cpu_count() > 1:
# parallelism requires this to be the case for a sane implementation
assert_false(est1 is est2)
