diff options
Diffstat (limited to 'python/pyspark/ml/tests.py')
-rw-r--r-- | python/pyspark/ml/tests.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/python/pyspark/ml/tests.py b/python/pyspark/ml/tests.py index 6a2577d66f..7a16cf52cc 100644 --- a/python/pyspark/ml/tests.py +++ b/python/pyspark/ml/tests.py @@ -20,6 +20,10 @@ Unit tests for Spark ML Python APIs. """ import sys +try: + import xmlrunner +except ImportError: + xmlrunner = None if sys.version_info[:2] <= (2, 6): try: @@ -368,4 +372,7 @@ class CrossValidatorTests(PySparkTestCase): if __name__ == "__main__": - unittest.main() + if xmlrunner: + unittest.main(testRunner=xmlrunner.XMLTestRunner(output='target/test-reports')) + else: + unittest.main() |