[Python-3000-checkins] r53859 - in python/branches/p3yk: BROKEN Lib/test/test_bsddb.py Lib/test/test_compile.py
guido.van.rossum
python-3000-checkins at python.org
Fri Feb 23 00:55:30 CET 2007
Author: guido.van.rossum
Date: Fri Feb 23 00:55:25 2007
New Revision: 53859
Removed:
python/branches/p3yk/BROKEN
Modified:
python/branches/p3yk/Lib/test/test_bsddb.py
python/branches/p3yk/Lib/test/test_compile.py
Log:
Fix the last two tests.
Thanks to Brett for fixing so many before!
I see some tracebacks from threads when testing test_bsddbd3 (on OSX)
but the test claims to pass, so I'm ignoring these.
Deleted: /python/branches/p3yk/BROKEN
==============================================================================
--- /python/branches/p3yk/BROKEN Fri Feb 23 00:55:25 2007
+++ (empty file)
@@ -1 +0,0 @@
- test_bsddb test_compile
Modified: python/branches/p3yk/Lib/test/test_bsddb.py
==============================================================================
--- python/branches/p3yk/Lib/test/test_bsddb.py (original)
+++ python/branches/p3yk/Lib/test/test_bsddb.py Fri Feb 23 00:55:25 2007
@@ -198,9 +198,9 @@
# do the bsddb._DBWithCursor _iter_mixin internals leak cursors?
nc1 = len(self.f._cursor_refs)
# create iterator
- i = iter(self.f.items())
+ i = iter(self.f.iteritems())
nc2 = len(self.f._cursor_refs)
- # use the iterator (should run to the first yeild, creating the cursor)
+ # use the iterator (should run to the first yield, creating the cursor)
k, v = i.next()
nc3 = len(self.f._cursor_refs)
# destroy the iterator; this should cause the weakref callback
@@ -210,7 +210,7 @@
self.assertEqual(nc1, nc2)
self.assertEqual(nc1, nc4)
- self.assert_(nc3 == nc1+1)
+ self.assertEqual(nc3, nc1+1)
def test_popitem(self):
k, v = self.f.popitem()
Modified: python/branches/p3yk/Lib/test/test_compile.py
==============================================================================
--- python/branches/p3yk/Lib/test/test_compile.py (original)
+++ python/branches/p3yk/Lib/test/test_compile.py Fri Feb 23 00:55:25 2007
@@ -53,8 +53,8 @@
raise KeyError
def __setitem__(self, key, value):
self.results = (key, value)
- def __iter__(self):
- return iter('xyz')
+ def keys(self):
+ return list('xyz')
m = M()
g = globals()
More information about the Python-3000-checkins
mailing list