diff --git a/test/test_persistent_dict.py b/test/test_persistent_dict.py index 61338d2a7b15787a52dbbe4773f12f8eaf197cf9..bea880807a12c636ec840194c5f4b56bbefb12f9 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)