summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHye-Shik Chang <hyeshik@gmail.com>2004-10-27 03:12:05 (GMT)
committerHye-Shik Chang <hyeshik@gmail.com>2004-10-27 03:12:05 (GMT)
commit7afa64e260ab14e164351fb2465d60298d2af5fa (patch)
tree1df25e8bc7b086856bacbcc6264e3a23dc09426a
parent1816d79bac1e74577fe4914c6a62e6e67450cc3c (diff)
downloadcpython-7afa64e260ab14e164351fb2465d60298d2af5fa.zip
cpython-7afa64e260ab14e164351fb2465d60298d2af5fa.tar.gz
cpython-7afa64e260ab14e164351fb2465d60298d2af5fa.tar.bz2
Add a comment explains why we should modify mtime here.
-rw-r--r--Lib/test/test_traceback.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/test/test_traceback.py b/Lib/test/test_traceback.py
index da56e0d..e8777da 100644
--- a/Lib/test/test_traceback.py
+++ b/Lib/test/test_traceback.py
@@ -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']