tailot's picture
thinking-python: reference implementation, corpus and gates
4bc63c7 verified
Raw History Blame Contribute Delete
291 Bytes
from cache import expiry, mark, memo, touch
def test_memo():
assert memo([('a',), ('b',)]) == ['a', 'b']
def test_expiry():
assert expiry(2) == 172800
def test_touch():
assert touch({'warm': True, 'key': 'k'}) == 'k'
def test_mark():
assert mark({'key': 'z'}) == 'key z'