Kaydet (Commit) f7010bed authored tarafından Raymond Hettinger's avatar Raymond Hettinger

* Bumped up the sleep() delay to four seconds so this test will run

  reliably on WinME with FAT32.
* Native speaker rewrite of the comment block.
* Removed unnecessary backslashes from the multi-line function defintions.
üst bb9c7398
...@@ -48,7 +48,7 @@ class TracebackCases(unittest.TestCase): ...@@ -48,7 +48,7 @@ class TracebackCases(unittest.TestCase):
try: try:
sys.path.insert(0, testdir) sys.path.insert(0, testdir)
testfile = os.path.join(testdir, 'test_bug737473.py') testfile = os.path.join(testdir, 'test_bug737473.py')
print >> open(testfile, 'w'), """\ print >> open(testfile, 'w'), """
def test(): def test():
raise ValueError""" raise ValueError"""
...@@ -62,12 +62,15 @@ def test(): ...@@ -62,12 +62,15 @@ def test():
# this loads source code to linecache # this loads source code to linecache
traceback.extract_tb(sys.exc_traceback) traceback.extract_tb(sys.exc_traceback)
# If this test runs fast, test_bug737473.py will stay in a mtime # If this test runs too quickly, test_bug737473.py's mtime
# even if it's rewrited and it'll not reloaded in result. So wait # attribute will remain unchanged even if the file is rewritten.
# until new timestamp comes. # Consequently, the file would not reload. So, added a sleep()
time.sleep(2) # delay to assure that a new, distinct timestamp is written.
# Since WinME with FAT32 has multisecond resolution, more than
# three seconds are needed for this test to pass reliably :-(
time.sleep(4)
print >> open(testfile, 'w'), """\ print >> open(testfile, 'w'), """
def test(): def test():
raise NotImplementedError""" raise NotImplementedError"""
reload(test_bug737473) reload(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