diff options
author | Gábor Lipták <gliptak@gmail.com> | 2015-10-22 15:27:11 -0700 |
---|---|---|
committer | Davies Liu <davies.liu@gmail.com> | 2015-10-22 15:27:11 -0700 |
commit | 163d53e829c166f061589cc379f61642d4c9a40f (patch) | |
tree | 72642ca829cecdaffc2c0bf8d45014b4696ef04c /python/pyspark/ml | |
parent | 53e83a3a77cafc2ccd0764ecdb8b3ba735bc51fc (diff) | |
download | spark-163d53e829c166f061589cc379f61642d4c9a40f.tar.gz spark-163d53e829c166f061589cc379f61642d4c9a40f.tar.bz2 spark-163d53e829c166f061589cc379f61642d4c9a40f.zip |
[SPARK-7021] Add JUnit output for Python unit tests
WIP
Author: Gábor Lipták <gliptak@gmail.com>
Closes #8323 from gliptak/SPARK-7021.
Diffstat (limited to 'python/pyspark/ml')
-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() |