Message129064
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)) |
|
Date |
User |
Action |
Args |
2011-02-22 12:41:53 | ysj.ray | set | recipients:
+ ysj.ray, pitrou, giampaolo.rodola, eric.araujo |
2011-02-22 12:41:53 | ysj.ray | set | messageid: <1298378513.82.0.274720681552.issue10228@psf.upfronthosting.co.za> |
2011-02-22 12:41:53 | ysj.ray | link | issue10228 messages |
2011-02-22 12:41:53 | ysj.ray | create | |
|