Don't assume sub-second resolution for st_atime/st_mtime.
authorNikolaus Rath <Nikolaus@rath.org>
Wed, 11 Jul 2018 09:33:16 +0000 (10:33 +0100)
committerNikolaus Rath <Nikolaus@rath.org>
Wed, 11 Jul 2018 09:33:16 +0000 (10:33 +0100)
Fixes: #224
test/test_examples.py

index 60b688879cf881dd38824c14b2d7f2d83df3db4a..995e6243441cf5d2785c0a8d7447affdd9a13189 100755 (executable)
@@ -593,8 +593,8 @@ def tst_utimens(mnt_dir, ns_tol=0):
 
     fstat = os.lstat(filename)
 
-    assert abs(fstat.st_atime - atime) < 1e-3
-    assert abs(fstat.st_mtime - mtime) < 1e-3
+    assert abs(fstat.st_atime - atime) < 1
+    assert abs(fstat.st_mtime - mtime) < 1
     if sys.version_info >= (3,3):
         assert abs(fstat.st_atime_ns - atime_ns) <= ns_tol
         assert abs(fstat.st_mtime_ns - mtime_ns) <= ns_tol