Skip to content

Commit 74ff478

Browse files
author
tobyroseman
committed
Try sleeping on windows to allow process to release file lock
1 parent 3aa8e28 commit 74ff478

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

oss_src/unity/python/sframe/test/test_gl_pickler.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
import os
55
import uuid
66
import shutil
7+
import sys
8+
import time
79

810
import pickle
911
from ..util import cloudpickle
@@ -22,6 +24,9 @@ def setUp(self):
2224
self.dir_mode = False
2325

2426
def tearDown(self):
27+
if sys.platform == 'win32':
28+
time.sleep(1) # Allow other process to release file lock
29+
2530
if os.path.isdir(self.filename):
2631
shutil.rmtree(self.filename)
2732
elif os.path.exists(self.filename):

0 commit comments

Comments
 (0)