]> granicus.if.org Git - python/commitdiff
Add a comment explains why we should modify mtime here.
authorHye-Shik Chang <hyeshik@gmail.com>
Wed, 27 Oct 2004 03:12:05 +0000 (03:12 +0000)
committerHye-Shik Chang <hyeshik@gmail.com>
Wed, 27 Oct 2004 03:12:05 +0000 (03:12 +0000)
Lib/test/test_traceback.py

index da56e0d5e2b6111a37e2cbc30df03119876db04c..e8777da25593d2c617b0298e6a3e7c45ab12d27f 100644 (file)
@@ -52,12 +52,14 @@ class TracebackCases(unittest.TestCase):
 def test():
     raise ValueError"""
 
-            # XXX Unclear why we're doing this next bit.
+            # if this test runs fast, test_bug737473.py will have same mtime
+            # even if it's rewrited and it'll not reloaded.  so adjust mtime
+            # of original to past.
             if hasattr(os, 'utime'):
                 past = time.time() - 3
                 os.utime(testfile, (past, past))
             else:
-                time.sleep(3) # not to stay in same mtime.
+                time.sleep(3)
 
             if 'test_bug737473' in sys.modules:
                 del sys.modules['test_bug737473']