diff -r 475c6a4dfab3 Lib/test/test_os.py --- a/Lib/test/test_os.py Tue Apr 21 10:57:41 2015 +0200 +++ b/Lib/test/test_os.py Tue Apr 21 03:44:19 2015 -0700 @@ -401,9 +401,11 @@ utime(filename, (attr(st0, "st_atime"), attr(st0, "st_mtime"))) # Setting the time to the time you just read, then reading again, # should always return exactly the same times. + # Use assertAlmostEqual to handle differences in precision between + # utime and os.stat on some platforms. st1 = os.stat(filename) - self.assertEqual(attr(st0, "st_mtime"), attr(st1, "st_mtime")) - self.assertEqual(attr(st0, "st_atime"), attr(st1, "st_atime")) + self.assertAlmostEqual(attr(st0, "st_mtime"), attr(st1, "st_mtime"), delta=delta) + self.assertAlmostEqual(attr(st0, "st_atime"), attr(st1, "st_atime"), delta=delta) # Set to the current time in the old explicit way. os.utime(filename, None) st2 = os.stat(support.TESTFN)