Commit bae622d0 authored by Vincent Pelletier's avatar Vincent Pelletier

Extend MQ self-tests a bit to detect the breakage fixed in r1679.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@1680 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent e39c94cf
...@@ -279,6 +279,11 @@ if __name__ == '__main__': ...@@ -279,6 +279,11 @@ if __name__ == '__main__':
cache = MQ(life_time=100, buffer_levels=9, max_history_size=10000, cache = MQ(life_time=100, buffer_levels=9, max_history_size=10000,
max_size=2*1024*1024) max_size=2*1024*1024)
cache[0] = 'foo'
assert cache[0] == 'foo', '0 should be present'
del cache[0]
assert cache.get(0) is None, '0 should not be present'
for i in xrange(10000): for i in xrange(10000):
assert cache.get(i) is None, '%d should not be present' % i assert cache.get(i) is None, '%d should not be present' % i
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment