From 0e6ec0647fa7d4f4d11d9ae8e25b03491c621bc6 Mon Sep 17 00:00:00 2001 From: Vito Sansevero Date: Thu, 22 Oct 2026 05:16:39 -0700 Subject: [PATCH] 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. --- tests/test_media_capture.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_media_capture.py b/tests/test_media_capture.py index 206f416e..d1a4986e 100644 --- a/tests/test_media_capture.py +++ b/tests/test_media_capture.py @@ -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):