File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -195,6 +195,7 @@ def test_input_file_hash_2(tmp_path):
195195 assert hash1 == hash2
196196
197197 # checking if different content (the same name) affects the hash
198+ time .sleep (2 ) # ensure mtime is different
198199 file_diffcontent = tmp_path / "in_file_1.txt"
199200 with open (file_diffcontent , "w" ) as f :
200201 f .write ("hi" )
@@ -225,6 +226,7 @@ def test_input_file_hash_2a(tmp_path):
225226 assert hash1 == hash2
226227
227228 # checking if different content (the same name) affects the hash
229+ time .sleep (2 ) # ensure mtime is different
228230 file_diffcontent = tmp_path / "in_file_1.txt"
229231 with open (file_diffcontent , "w" ) as f :
230232 f .write ("hi" )
@@ -266,6 +268,7 @@ def test_input_file_hash_3(tmp_path):
266268 # assert id(files_hash1["in_file"][filename]) == id(files_hash2["in_file"][filename])
267269
268270 # recreating the file
271+ time .sleep (2 ) # ensure mtime is different
269272 with open (file , "w" ) as f :
270273 f .write ("hello" )
271274
@@ -357,6 +360,7 @@ def test_input_file_hash_5(tmp_path):
357360 assert hash1 == hash2
358361
359362 # checking if different content (the same name) affects the hash
363+ time .sleep (2 ) # ensure mtime is different
360364 file_diffcontent = tmp_path / "in_file_1.txt"
361365 with open (file_diffcontent , "w" ) as f :
362366 f .write ("hi" )
You can’t perform that action at this time.
0 commit comments