From 1c48f4d2c370ae83e34336512b7eca617d09a16f Mon Sep 17 00:00:00 2001 From: bensig Date: Thu, 9 Apr 2026 09:23:08 -0700 Subject: [PATCH] fix: use os.utime in mtime test for Windows compatibility --- tests/test_miner.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/test_miner.py b/tests/test_miner.py index 056fdaa..bd3d3f2 100644 --- a/tests/test_miner.py +++ b/tests/test_miner.py @@ -1,7 +1,6 @@ import os import shutil import tempfile -import time from pathlib import Path import chromadb @@ -240,10 +239,10 @@ def test_file_already_mined_check_mtime(): # Already mined (mtime matches) assert file_already_mined(col, test_file, check_mtime=True) is True - # Modify file so mtime changes - time.sleep(0.1) + # Modify file and force a different mtime (Windows has low mtime resolution) with open(test_file, "w") as f: f.write("modified content") + os.utime(test_file, (mtime + 10, mtime + 10)) # Still mined without mtime check assert file_already_mined(col, test_file) is True