1 # -*- coding: utf-8 -*-
6 This module tests the LRU Cache
8 :copyright: Copyright 2008 by Armin Ronacher.
15 from jinja2.utils import LRUCache
26 assert 'a' in d and 'c' in d and 'd' in d and 'b' not in d
29 def test_pickleable():
35 for protocol in range(3):
36 copy = pickle.loads(pickle.dumps(cache, protocol))
37 assert copy.capacity == cache.capacity
38 assert copy._mapping == cache._mapping
39 assert copy._queue == cache._queue