aboutsummaryrefslogtreecommitdiff
path: root/python/pyspark/mllib/tests.py
diff options
context:
space:
mode:
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