Kaydet (Commit) 4a50d26b authored tarafından Neal Norwitz's avatar Neal Norwitz

Close the file before trying to remove the directory so it works on Windows.

As reported by Trent Nelson on python-dev.
üst fd6cabfe
...@@ -97,8 +97,9 @@ class BasicTestCase(unittest.TestCase): ...@@ -97,8 +97,9 @@ class BasicTestCase(unittest.TestCase):
def tearDown(self): def tearDown(self):
self.d.close() self.d.close()
if self.env is not None: if self.env is not None:
test_support.rmtree(self.homeDir)
self.env.close() self.env.close()
test_support.rmtree(self.homeDir)
## XXX(nnorwitz): is this comment stil valid?
## Make a new DBEnv to remove the env files from the home dir. ## Make a new DBEnv to remove the env files from the home dir.
## (It can't be done while the env is open, nor after it has been ## (It can't be done while the env is open, nor after it has been
## closed, so we make a new one to do it.) ## closed, so we make a new one to do it.)
......
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