Use rmtree in the retry mechanism

This commit is contained in:
Raoul Snyman 2016-01-15 20:10:09 +02:00
parent b11b88f4eb
commit e1ed3ab163
1 changed files with 4 additions and 3 deletions

View File

@ -60,12 +60,13 @@ class TestUtilsDBFunctions(TestCase):
retries = 0 retries = 0
while retries < 5: while retries < 5:
try: try:
os.unlink(self.db_tmp_path) shutil.rmtree(self.tmp_folder)
# os.unlink(self.db_tmp_path)
break break
except: except Exception as e:
time.sleep(1) time.sleep(1)
retries += 1 retries += 1
shutil.rmtree(self.tmp_folder) print(e)
def delete_column_test(self): def delete_column_test(self):
""" """