Python @directory walk asserts the directory stays empty; manifest comment names the write paths
Some checks failed
CultMesh portability and performance / ubuntu-latest reactive semantics and leases (pull_request) Has been cancelled
Some checks failed
CultMesh portability and performance / ubuntu-latest reactive semantics and leases (pull_request) Has been cancelled
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
e79abfbc55
commit
12e938d23c
2 changed files with 3 additions and 5 deletions
|
|
@ -1606,14 +1606,12 @@ class CultCacheTests(unittest.TestCase):
|
|||
# A path that cannot be reached as a file stays an OSError (_read_store): not a store that failed to decode.
|
||||
with self.assertRaises(OSError, msg=f"{vector} {operation}"):
|
||||
run()
|
||||
self.assertTrue(store_path.is_dir() and not any(store_path.iterdir()), f"{vector} {operation} touched the directory")
|
||||
else:
|
||||
with self.assertRaises(StoreUnreadableError, msg=f"{vector} {operation}") as refused:
|
||||
run()
|
||||
self.assertIsNotNone(refused.exception.__cause__, f"{vector} {operation}")
|
||||
if content is None:
|
||||
self.assertTrue(store_path.is_dir() and not any(store_path.iterdir()), f"{vector} {operation} touched the directory")
|
||||
else:
|
||||
self.assertEqual(store_path.read_bytes(), content, f"{vector} {operation} rewrote a file it cannot read")
|
||||
self.assertEqual(store_path.read_bytes(), content, f"{vector} {operation} rewrote a file it cannot read")
|
||||
|
||||
@staticmethod
|
||||
def _rec(type: str, key: str, second: int = 0) -> CultCacheEnvelope:
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Whether each runtime's own reader opens the file. A flush and a commit replace a file exactly when it reads; where a runtime has a soft flush (TypeScript, Rust) it leaves a file that reads byte for byte and refuses one that does not.
|
||||
# A store holding two records under one key is unreadable; keys are ordinal strings (no case folding, no normalisation), so distinct spellings are distinct keys.
|
||||
# Columns: file, csharp, rust, typescript, python. `../v3-base.msgpack` is the one valid store.
|
||||
# `@directory` is no file: the walker makes an empty directory at the store path and every runtime must refuse to open it.
|
||||
# `@directory` is no file: the walker makes an empty directory at the store path and every runtime must refuse to open it and to write over it (flush, commit, delete), leaving the directory empty.
|
||||
../v3-base.msgpack reads reads reads reads
|
||||
zero-byte.bin refuses refuses refuses refuses
|
||||
empty-array.bin reads reads reads reads
|
||||
|
|
|
|||
Loading…
Reference in a new issue