This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ysj.ray
Recipients eric.araujo, giampaolo.rodola, pitrou, ysj.ray
Date 2011-02-22.12:41:53
SpamBayes Score 6.694629e-09
Marked as misclassified No
Message-id <1298378513.82.0.274720681552.issue10228@psf.upfronthosting.co.za>
In-reply-to
Content
It looks like because before the second time running of WhichDBTestCase.test_whichdb(), previous dumb files are not cleaned clearly, so the gdbm's open() doesn't create a new gdbm database but open an existing dumb database.

In fact during the working of #9523, I found this problem and fix it in the patch of #9523. Here I extract the fixing, it is simple:


cat patches/issue10228.diff 
Index: Lib/test/test_dbm.py
===================================================================
--- Lib/test/test_dbm.py	(revision 88499)
+++ Lib/test/test_dbm.py	(working copy)
@@ -123,7 +123,7 @@
             name = module.__name__
             if name == 'dbm.dumb':
                 continue   # whichdb can't support dbm.dumb
-            test.support.unlink(_fname)
+            delete_files()
             f = module.open(_fname, 'c')
             f.close()
             self.assertEqual(name, dbm.whichdb(_fname))
History
Date User Action Args
2011-02-22 12:41:53ysj.raysetrecipients: + ysj.ray, pitrou, giampaolo.rodola, eric.araujo
2011-02-22 12:41:53ysj.raysetmessageid: <1298378513.82.0.274720681552.issue10228@psf.upfronthosting.co.za>
2011-02-22 12:41:53ysj.raylinkissue10228 messages
2011-02-22 12:41:53ysj.raycreate