mirror of
https://github.com/python/cpython.git
synced 2026-01-06 07:22:09 +00:00
Add a comment explains why we should modify mtime here.
This commit is contained in:
parent
1816d79bac
commit
7afa64e260
1 changed files with 4 additions and 2 deletions
|
|
@ -52,12 +52,14 @@ def test_bug737473(self):
|
|||
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']
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue