~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_lru_cache.py

  • Committer: John Arbash Meinel
  • Date: 2009-04-15 18:08:16 UTC
  • mto: This revision was merged to the branch mainline in revision 4323.
  • Revision ID: john@arbash-meinel.com-20090415180816-gt70a2f8zdy9zkn9
Properly remove the nodes from the internal linked list in _remove_node.

Show diffs side-by-side

added added

removed removed

Lines of Context:
138
138
 
139
139
        # We hit the max
140
140
        self.assertEqual(10, len(cache))
 
141
        self.assertEqual([11, 10, 9, 1, 8, 7, 6, 5, 4, 3],
 
142
                         [n.key for n in cache._walk_lru()])
141
143
 
142
144
    def test_cleanup_shrinks_to_after_clean_count(self):
143
145
        cache = lru_cache.LRUCache(max_cache=5, after_cleanup_count=3)