[issue13327] Update utime API to not require explicit None argument

Antoine Pitrou report at bugs.python.org
Thu Nov 3 03:12:43 CET 2011


Antoine Pitrou <pitrou at free.fr> added the comment:

You have a possible failure here: 

+        # Set to the current time in the old explicit way.
+        os.utime(support.TESTFN, None)
+        st1 = os.stat(support.TESTFN)
+        # Set to the current time in the new way
+        os.utime(support.TESTFN)
+        st2 = os.stat(support.TESTFN)
+        self.assertEqual(st1.st_mtime, st2.st_mtime)

I managed to trigger it after a run of tests:

======================================================================
FAIL: test_utime_noargs (test.test_os.StatAttributeTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/antoine/cpython/default/Lib/test/test_os.py", line 286, in test_utime_noargs
    self.assertEqual(st1.st_mtime, st2.st_mtime)
AssertionError: 1320285959.712339 != 1320285959.7133389


Otherwise, +1.

----------
nosy: +pitrou

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13327>
_______________________________________


More information about the Python-bugs-list mailing list