[Zope-CVS] CVS: Packages/pypes/pypes/tests - test_extent.py:1.9
Casey Duncan
casey at zope.com
Mon Feb 16 01:00:03 EST 2004
Update of /cvs-repository/Packages/pypes/pypes/tests
In directory cvs.zope.org:/tmp/cvs-serv29278/tests
Modified Files:
test_extent.py
Log Message:
Add test for direct instance removal with remaining subclass instances preserves extent
=== Packages/pypes/pypes/tests/test_extent.py 1.8 => 1.9 ===
--- Packages/pypes/pypes/tests/test_extent.py:1.8 Mon Feb 16 00:54:03 2004
+++ Packages/pypes/pypes/tests/test_extent.py Mon Feb 16 01:00:01 2004
@@ -304,6 +304,16 @@
self.identity.remove(ob)
for ex in extents:
self.assertEqual(len(ex), 0)
+
+ def testRemoveDirectInstancesLeavesSubClassInstances(self):
+ bar = self._makeObj(BarClass)
+ baz = self._makeObj(BazClass)
+ self.assertEqual(len(self.cemap[BarClass]), 2)
+ self.identity.remove(bar)
+ self.assertEqual(len(self.cemap[BarClass]), 1)
+ self.failUnless(baz in self.cemap[BarClass])
+ self.identity.remove(baz)
+ self.assertRaises(KeyError, lambda cls: self.cemap[cls], BarClass)
class TestExtent(unittest.TestCase):
More information about the Zope-CVS
mailing list