Skip to content

Commit fc40a79

Browse files
committed
Fix tests
1 parent 9b223ca commit fc40a79

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Lib/test/test_pathlib/test_pathlib.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -787,8 +787,9 @@ def test_copy_dir_preserve_metadata(self):
787787
for subpath in ['.', 'fileC', 'dirD', 'dirD/fileD']:
788788
source_st = source.joinpath(subpath).stat()
789789
target_st = target.joinpath(subpath).stat()
790-
self.assertLessEqual(source_st.st_atime, target_st.st_atime)
791-
self.assertLessEqual(source_st.st_mtime, target_st.st_mtime)
790+
# The modification times may be truncated in the new file.
791+
self.assertLessEqual(source_st.st_atime, target_st.st_atime + 1)
792+
self.assertLessEqual(source_st.st_mtime, target_st.st_mtime + 1)
792793
self.assertEqual(source_st.st_mode, target_st.st_mode)
793794
if hasattr(source_st, 'st_flags'):
794795
self.assertEqual(source_st.st_flags, target_st.st_flags)

0 commit comments

Comments
 (0)