[Python-checkins] r61233 - python/trunk/Lib/bsddb/test/test_basics.py

neal.norwitz python-checkins at python.org
Tue Mar 4 17:22:47 CET 2008


Author: neal.norwitz
Date: Tue Mar  4 17:22:46 2008
New Revision: 61233

Modified:
   python/trunk/Lib/bsddb/test/test_basics.py
Log:
Close the file before trying to remove the directory so it works on Windows.
As reported by Trent Nelson on python-dev.


Modified: python/trunk/Lib/bsddb/test/test_basics.py
==============================================================================
--- python/trunk/Lib/bsddb/test/test_basics.py	(original)
+++ python/trunk/Lib/bsddb/test/test_basics.py	Tue Mar  4 17:22:46 2008
@@ -97,8 +97,9 @@
     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.)


More information about the Python-checkins mailing list