Skip to content

Github Issue for file caching #148

@chlaw27

Description

@chlaw27

When I run "make test" I get the following error in my MacOS machine.

======================================================= FAILURES ========================================================
______________________________________________ test_lru_respects_get_calls ______________________________________________

cache = <biolearn.cache.LocalFolderCache object at 0x3088c6420>

def test_lru_respects_get_calls(cache):
    # Store items exceeding the cache size limit
    cache.store("key1", "a" * 500)
    time.sleep(2)  # Ensure file timestamps are different
    cache.store("key2", "b" * 400)
    time.sleep(2)
    cache.get("key1")  # Ensure Key1 most recently used
    time.sleep(2)
    cache.store("key3", "c" * 150)

    # Check that the least recently used item (key1) is evicted
  assert cache.get("key1") == "a" * 500

E AssertionError: assert None == ('a' * 500)
E + where None = get('key1')
E + where get = <biolearn.cache.LocalFolderCache object at 0x3088c6420>.get

biolearn/test/test_cache.py:59: AssertionError

I haven't touched the caching code and haven't run into this issue for a while when pushing and pull requesting until now.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions