Commit 7afa64e2 authored by Hye-Shik Chang's avatar Hye-Shik Chang

Add a comment explains why we should modify mtime here.

parent 1816d79b
...@@ -52,12 +52,14 @@ class TracebackCases(unittest.TestCase): ...@@ -52,12 +52,14 @@ class TracebackCases(unittest.TestCase):
def test(): def test():
raise ValueError""" 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'): if hasattr(os, 'utime'):
past = time.time() - 3 past = time.time() - 3
os.utime(testfile, (past, past)) os.utime(testfile, (past, past))
else: else:
time.sleep(3) # not to stay in same mtime. time.sleep(3)
if 'test_bug737473' in sys.modules: if 'test_bug737473' in sys.modules:
del sys.modules['test_bug737473'] del sys.modules['test_bug737473']
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment