Be a little more insistent when cleaning up test dir

This commit is contained in:
Kovid Goyal 2017-05-04 18:06:18 +05:30
parent 8f17d21390
commit c55cb4365a
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -62,7 +62,12 @@ class IPCLockTest(unittest.TestCase):
def tearDown(self):
os.chdir(self.cwd)
shutil.rmtree(self.tdir)
for i in range(100):
try:
shutil.rmtree(self.tdir)
break
except EnvironmentError:
time.sleep(0.1)
def test_exclusive_file_same_process(self):
fname = 'testsp'