Skip to content

Commit

Permalink
update test read-only cache
Browse files Browse the repository at this point in the history
  • Loading branch information
benvanwerkhoven committed Jun 20, 2024
1 parent 9468339 commit dbc811e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/test_cachefile_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,9 @@ def assert_cache_unchanged(self, cache_file, cache_backup_file):
assert cache.read() == backup.read()

def test_read__cannot_modify(self, cache_file, full_cache_line, assert_cache_unchanged):
cache = Cache.read(cache_file)
cache.lines.append(**vars(full_cache_line))
cache = Cache.read(cache_file, read_only=True)
with pytest.raises(ValueError):
cache.lines.append(**vars(full_cache_line))

def test_read__outdated(self):
cache = Cache.read(XXL_CACHE_PATH)
Expand Down

0 comments on commit dbc811e

Please sign in to comment.