summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2008-03-04 16:22:46 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2008-03-04 16:22:46 (GMT)
commit4a50d26ba229e5154b9c28c7e4073848f1850585 (patch)
treea263485e27909942331188ffa7e078e463ea43dd
parentfd6cabfe21f4eeecd215d07c2d6d01309ef3dc3d (diff)
downloadcpython-4a50d26ba229e5154b9c28c7e4073848f1850585.zip
cpython-4a50d26ba229e5154b9c28c7e4073848f1850585.tar.gz
cpython-4a50d26ba229e5154b9c28c7e4073848f1850585.tar.bz2
Close the file before trying to remove the directory so it works on Windows.
As reported by Trent Nelson on python-dev.
-rw-r--r--Lib/bsddb/test/test_basics.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/bsddb/test/test_basics.py b/Lib/bsddb/test/test_basics.py
index f0b5e32..de935f7 100644
--- a/Lib/bsddb/test/test_basics.py
+++ b/Lib/bsddb/test/test_basics.py
@@ -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.)