Download fixtures/seed_project/tests/test_cache.py from tailot/lingologos-thinkingpython: direct link, hf CLI and curl.
- Browser
- Download file 291 Bytes
-
https://huggingface.co/datasets/tailot/lingologos-thinkingpython/resolve/main/fixtures/seed_project/tests/test_cache.py
- Command line
-
hf download hf://datasets/tailot/lingologos-thinkingpython/fixtures/seed_project/tests/test_cache.py
-
curl -L -o test_cache.py https://huggingface.co/datasets/tailot/lingologos-thinkingpython/resolve/main/fixtures/seed_project/tests/test_cache.py
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' | |