Browse Source

Work around intermittent mkdir failures in testcfg.py

v0.7.4-release
Bert Belder 14 years ago
parent
commit
d66cf5f32c
  1. 8
      test/simple/testcfg.py

8
test/simple/testcfg.py

@ -55,7 +55,10 @@ class SimpleTestCase(test.TestCase):
except: except:
pass pass
# make it again. # make it again.
try:
mkdir(self.tmpdir) mkdir(self.tmpdir)
except:
pass
def BeforeRun(self): def BeforeRun(self):
# delete the whole tmp dir # delete the whole tmp dir
@ -64,7 +67,12 @@ class SimpleTestCase(test.TestCase):
except: except:
pass pass
# make it again. # make it again.
# intermittently fails on win32, so keep trying
while not os.path.exists(self.tmpdir):
try:
mkdir(self.tmpdir) mkdir(self.tmpdir)
except:
pass
def GetLabel(self): def GetLabel(self):
return "%s %s" % (self.mode, self.GetName()) return "%s %s" % (self.mode, self.GetName())

Loading…
Cancel
Save