]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Close the file before trying to remove the directory so it works on Windows.
authorNeal Norwitz <nnorwitz@gmail.com>
Tue, 4 Mar 2008 16:22:46 +0000 (16:22 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Tue, 4 Mar 2008 16:22:46 +0000 (16:22 +0000)
As reported by Trent Nelson on python-dev.

Lib/bsddb/test/test_basics.py

index f0b5e32ed31ee2cca08a46d17b3c498ade38b462..de935f755667dc6f1f684e956b80d4aa75433c59 100644 (file)
@@ -97,8 +97,9 @@ class BasicTestCase(unittest.TestCase):
     def tearDown(self):
         self.d.close()
         if self.env is not None:
-            test_support.rmtree(self.homeDir)
             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.
             ## (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.)