aboutsummaryrefslogtreecommitdiff
path: root/python/pyspark/mllib/tests.py
diff options
context:
space:
mode:
authorYu ISHIKAWA <yuu.ishikawa@gmail.com>2015-06-22 11:53:11 -0700
committerJoseph K. Bradley <joseph@databricks.com>2015-06-22 11:53:11 -0700
commit5d89d9f00ba4d6d0767a4c4964d3af324bf6f14b (patch)
tree25b1af9cd89527d98323b5fce60ff45bd85d2bf7 /python/pyspark/mllib/tests.py
parentba8a4537fee7d85f968cccf8d1c607731daae307 (diff)
downloadspark-5d89d9f00ba4d6d0767a4c4964d3af324bf6f14b.tar.gz
spark-5d89d9f00ba4d6d0767a4c4964d3af324bf6f14b.tar.bz2
spark-5d89d9f00ba4d6d0767a4c4964d3af324bf6f14b.zip
[SPARK-8511] [PYSPARK] Modify a test to remove a saved model in `regression.py`
[[SPARK-8511] Modify a test to remove a saved model in `regression.py` - ASF JIRA](https://issues.apache.org/jira/browse/SPARK-8511) Author: Yu ISHIKAWA <yuu.ishikawa@gmail.com> Closes #6926 from yu-iskw/SPARK-8511 and squashes the following commits: 7cd0948 [Yu ISHIKAWA] Use `shutil.rmtree()` to temporary directories for saving model testings, instead of `os.removedirs()` 4a01c9e [Yu ISHIKAWA] [SPARK-8511][pyspark] Modify a test to remove a saved model in `regression.py`
Diffstat (limited to 'python/pyspark/mllib/tests.py')
-rw-r--r--python/pyspark/mllib/tests.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/python/pyspark/mllib/tests.py b/python/pyspark/mllib/tests.py
index 744dc112d9..b13159e29d 100644
--- a/python/pyspark/mllib/tests.py
+++ b/python/pyspark/mllib/tests.py
@@ -24,6 +24,7 @@ import sys
import tempfile
import array as pyarray
from time import time, sleep
+from shutil import rmtree
from numpy import array, array_equal, zeros, inf, all, random
from numpy import sum as array_sum
@@ -398,7 +399,7 @@ class ListTests(MLlibTestCase):
self.assertEqual(same_gbt_model.toDebugString(), gbt_model.toDebugString())
try:
- os.removedirs(temp_dir)
+ rmtree(temp_dir)
except OSError:
pass