summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-02-22 23:55:25 (GMT)
committerGuido van Rossum <guido@python.org>2007-02-22 23:55:25 (GMT)
commit63eecc7eee12e473701c834592db00ff1bf43423 (patch)
treecdc432117e49ec38ede219afa9539a8f2a4a7521
parent0072e43d295f25b709ced3b9f7a395fbd35d08e0 (diff)
downloadcpython-63eecc7eee12e473701c834592db00ff1bf43423.zip
cpython-63eecc7eee12e473701c834592db00ff1bf43423.tar.gz
cpython-63eecc7eee12e473701c834592db00ff1bf43423.tar.bz2
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.
-rw-r--r--BROKEN1
-rwxr-xr-xLib/test/test_bsddb.py6
-rw-r--r--Lib/test/test_compile.py4
3 files changed, 5 insertions, 6 deletions
diff --git a/BROKEN b/BROKEN
deleted file mode 100644
index 60e1051..0000000
--- a/BROKEN
+++ /dev/null
@@ -1 +0,0 @@
- test_bsddb test_compile
diff --git a/Lib/test/test_bsddb.py b/Lib/test/test_bsddb.py
index 0fb8e87..3a62f9c 100755
--- a/Lib/test/test_bsddb.py
+++ b/Lib/test/test_bsddb.py
@@ -198,9 +198,9 @@ class TestBSDDB(unittest.TestCase):
# 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 @@ class TestBSDDB(unittest.TestCase):
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()
diff --git a/Lib/test/test_compile.py b/Lib/test/test_compile.py
index 2b5a135..1acb4a1 100644
--- a/Lib/test/test_compile.py
+++ b/Lib/test/test_compile.py
@@ -53,8 +53,8 @@ class TestSpecifics(unittest.TestCase):
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()