From 57407ab8dddbe9a43b1140afdea14a66df679bd7 Mon Sep 17 00:00:00 2001 From: Mustafa Bal Date: Fri, 20 Dec 2019 02:49:18 -0800 Subject: [PATCH 1/2] Disabled tests that only fail on Mac Py2.7 due to string encoding/decoding bug --- src/python/nimbusml/tests/ensemble/test_lightgbmclassifier.py | 4 ++++ .../tests/feature_extraction/text/test_ngramfeaturizer.py | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/python/nimbusml/tests/ensemble/test_lightgbmclassifier.py b/src/python/nimbusml/tests/ensemble/test_lightgbmclassifier.py index addc22fd..16442dff 100644 --- a/src/python/nimbusml/tests/ensemble/test_lightgbmclassifier.py +++ b/src/python/nimbusml/tests/ensemble/test_lightgbmclassifier.py @@ -19,6 +19,10 @@ class TestLightGbmClassifier(unittest.TestCase): + @unittest.skipIf(platform.system() == "Darwin" and six.PY2, + "Disabled due to bug on Mac Python 2.7 build, more info: \ + https://github.com/microsoft/NimbusML/issues/366, \ + https://github.com/microsoft/NimbusML/pull/362") def test_lightgbmclassifier(self): np.random.seed(0) train_file = get_dataset('wiki_detox_train').as_filepath() diff --git a/src/python/nimbusml/tests/feature_extraction/text/test_ngramfeaturizer.py b/src/python/nimbusml/tests/feature_extraction/text/test_ngramfeaturizer.py index 2f3ddd9a..e68c412b 100644 --- a/src/python/nimbusml/tests/feature_extraction/text/test_ngramfeaturizer.py +++ b/src/python/nimbusml/tests/feature_extraction/text/test_ngramfeaturizer.py @@ -18,6 +18,10 @@ class TestNGramFeaturizer(unittest.TestCase): + @unittest.skipIf(platform.system() == "Darwin" and six.PY2, + "Disabled due to bug on Mac Python 2.7 build, more info: \ + https://github.com/microsoft/NimbusML/issues/366, \ + https://github.com/microsoft/NimbusML/pull/362") def test_ngramfeaturizer(self): np.random.seed(0) train_file = get_dataset('wiki_detox_train').as_filepath() From 5539576e0fb8167df5523b7588a322db59d69bca Mon Sep 17 00:00:00 2001 From: Mustafa Bal Date: Mon, 23 Dec 2019 12:26:08 -0800 Subject: [PATCH 2/2] Update test_ngramfeaturizer.py --- .../tests/feature_extraction/text/test_ngramfeaturizer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/python/nimbusml/tests/feature_extraction/text/test_ngramfeaturizer.py b/src/python/nimbusml/tests/feature_extraction/text/test_ngramfeaturizer.py index e68c412b..21ad6c12 100644 --- a/src/python/nimbusml/tests/feature_extraction/text/test_ngramfeaturizer.py +++ b/src/python/nimbusml/tests/feature_extraction/text/test_ngramfeaturizer.py @@ -3,7 +3,7 @@ # Licensed under the MIT License. # -------------------------------------------------------------------------------------------- -import os +import platform import unittest import numpy as np