[Zodb-checkins] CVS: Packages/BTrees/tests - testBTrees.py:1.51.8.4
Tim Peters
tim.one at comcast.net
Mon Jul 18 15:40:35 EDT 2005
Update of /cvs-repository/Packages/BTrees/tests
In directory cvs.zope.org:/tmp/cvs-serv4422/BTrees/tests
Modified Files:
Tag: Zope-2_7-branch
testBTrees.py
Log Message:
Backport from ZODB 3.4.
Collector 1843: IISet.keys: bad exception handling.
Bucket_rangeSearch(): De-obfuscated the calls to
Bucket_findRangeEnd(), so that they stop ignoring
the latter's error returns (a mind-bending combination
of embedded assignment nested in an UNLESS macro,
seemingly copy+paste'd so that the error occurred twice).
=== Packages/BTrees/tests/testBTrees.py 1.51.8.3 => 1.51.8.4 ===
--- Packages/BTrees/tests/testBTrees.py:1.51.8.3 Tue Jul 5 12:41:34 2005
+++ Packages/BTrees/tests/testBTrees.py Mon Jul 18 15:40:35 2005
@@ -913,6 +913,15 @@
def setUp(self):
self.t = IISet()
+ # Collector 1843. Error returns were effectively ignored in
+ # Bucket_rangeSearch(), leading to "delayed" errors, or worse.
+ def testNonIntKeyRaises(self):
+ self.t.insert(1)
+ # This one used to fail to raise the TypeError when it occurred.
+ self.assertRaises(TypeError, self.t.keys, "")
+ # This one used to segfault.
+ self.assertRaises(TypeError, self.t.keys, 0, "")
+
class TestOISets(ExtendedSetTests, TestCase):
def setUp(self):
self.t = OISet()
More information about the Zodb-checkins
mailing list