test(annotations): wait on the POSIX change time only where it exists

The same-size rewrite case waits for the filesystem clock to pass the
source's ctime so the detection is deterministic on Linux's coarse
timestamps; Windows reports the creation time as st_ctime, where the
probe could never advance, so the wait runs only on POSIX.
This commit is contained in:
Vito Sansevero
2026-10-22 05:16:39 -07:00
parent a3d5c16318
commit 0e6ec0647f
+2 -1
View File
@@ -276,7 +276,8 @@ class CaptureStoreTestCase(unittest.TestCase):
# so there the torn copy completes and its digest describes the copy.
source.write_bytes(source_bytes)
before = os.stat(source)
self.wait_for_change_time_after(before.st_ctime_ns)
if os.name == "posix": # Windows st_ctime is the creation time
self.wait_for_change_time_after(before.st_ctime_ns)
rewritten = bytes(b ^ 0xFF for b in source_bytes)
def rewriting(store_, stream, size):