Commit 9d45688c authored by Lisandro Dalcin's avatar Lisandro Dalcin

attempt to fix rmtree Windows issues in test case

parent 19229e84
...@@ -6,6 +6,7 @@ import re ...@@ -6,6 +6,7 @@ import re
import gc import gc
import codecs import codecs
import shutil import shutil
import time
import unittest import unittest
import doctest import doctest
import operator import operator
...@@ -816,7 +817,13 @@ class EndToEndTest(unittest.TestCase): ...@@ -816,7 +817,13 @@ class EndToEndTest(unittest.TestCase):
def tearDown(self): def tearDown(self):
if self.cleanup_workdir: if self.cleanup_workdir:
shutil.rmtree(self.workdir) for trial in range(5):
try:
shutil.rmtree(self.workdir)
except OSError:
time.sleep(0.1)
else:
break
os.chdir(self.old_dir) os.chdir(self.old_dir)
def runTest(self): def runTest(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment