Rev 3891: Test that del x[foo] also triggers a cleanup. in http://bzr.arbash-meinel.com/branches/bzr/1.11/fifo_cache
John Arbash Meinel
john at arbash-meinel.com
Tue Dec 9 22:04:02 GMT 2008
At http://bzr.arbash-meinel.com/branches/bzr/1.11/fifo_cache
------------------------------------------------------------
revno: 3891
revision-id: john at arbash-meinel.com-20081209220341-9d70gll0szipelao
parent: john at arbash-meinel.com-20081209220003-05o6ymacid6io8mn
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: fifo_cache
timestamp: Tue 2008-12-09 16:03:41 -0600
message:
Test that del x[foo] also triggers a cleanup.
-------------- next part --------------
=== 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 = []
More information about the bazaar-commits
mailing list