From 4a216308d8b0295dd63733a4f6d661c39ef017bb Mon Sep 17 00:00:00 2001 From: Matt Wala Date: Sat, 23 Sep 2017 17:42:43 -0500 Subject: [PATCH] check cache collision on update in WriteOncePersistentDict --- test/test_persistent_dict.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/test_persistent_dict.py b/test/test_persistent_dict.py index 61338d2..bea8808 100644 --- a/test/test_persistent_dict.py +++ b/test/test_persistent_dict.py @@ -261,11 +261,15 @@ def test_write_once_persistent_dict_cache_collisions(): key2 = PDictTestingKeyOrValue(2, hash_key=0) pdict[key1] = 1 + # check lookup with pytest.warns(UserWarning): - # check lookup with pytest.raises(NoSuchEntryError): pdict[key2] + # check update + with pytest.raises(ReadOnlyEntryError): + pdict[key2] = 1 + finally: shutil.rmtree(tmpdir) -- GitLab