1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
|
--- a/sklearn/feature_extraction/tests/test_text.py
+++ b/sklearn/feature_extraction/tests/test_text.py
@@ -372,6 +372,10 @@
numpy_provides_div0_warning = len(w) == 1
in_warning_message = 'divide by zero'
+ import platform
+ if platform.uname()[4].startswith('armv'):
+ raise SkipTest("no warning gets issued on armel")
+
tfidf = assert_warns_message(RuntimeWarning, in_warning_message,
tr.fit_transform, X).toarray()
if not numpy_provides_div0_warning:
--- a/sklearn/metrics/tests/test_ranking.py
+++ b/sklearn/metrics/tests/test_ranking.py
@@ -612,6 +612,10 @@
y_true = [0, 0]
y_score = [0.25, 0.75]
+ import platform
+ if platform.uname()[4].startswith('armv'):
+ import nose
+ raise nose.SkipTest("no precision-related exceptions get issued on armel")
assert_raises(Exception, precision_recall_curve, y_true, y_score)
assert_raises(Exception, average_precision_score, y_true, y_score)
--- a/sklearn/metrics/tests/test_classification.py
+++ b/sklearn/metrics/tests/test_classification.py
@@ -511,6 +511,11 @@
# Zero variance will result in an mcc of zero and a Runtime Warning
y_true = [0, 1, 2]
y_pred = [3, 3, 3]
+ import platform
+ if platform.uname()[4].startswith('armv'):
+ import nose
+ from sklearn.utils.testing import SkipTest
+ raise SkipTest("no warning gets issued on armel")
mcc = assert_warns_message(RuntimeWarning, 'invalid value encountered',
matthews_corrcoef, y_true, y_pred)
assert_almost_equal(mcc, 0.0)
|