At http://bzr.arbash-meinel.com/branches/bzr/1.11/fifo_cache
------------------------------------------------------------
revno: 3891
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: John Arbash Meinel <[EMAIL PROTECTED]>
branch nick: fifo_cache
timestamp: Tue 2008-12-09 16:03:41 -0600
message:
Test that del x[foo] also triggers a cleanup.
=== modified file 'bzrlib/tests/test_fifo_cache.py'
--- a/bzrlib/tests/test_fifo_cache.py 2008-12-09 22:00:03 +0000
+++ b/bzrlib/tests/test_fifo_cache.py 2008-12-09 22:03:41 +0000
@@ -171,6 +171,11 @@
# Clearing everything should call all remaining cleanups
c.clear()
self.assertEqual([(6, 7)], log)
+ del log[:]
+ c.add(8, 9, cleanup=logging_cleanup)
+ # __delitem__ should also trigger a cleanup
+ del c[8]
+ self.assertEqual([(8, 9)], log)
def test_cleanup_at_deconstruct(self):
log = []
--
bazaar-commits mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/bazaar-commits