summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2004-11-01 22:27:14 (GMT)
committerRaymond Hettinger <python@rcn.com>2004-11-01 22:27:14 (GMT)
commitf7010bed894d73c6e4fdc7e8c118395bb4dda238 (patch)
treef75d7629f3fb491fe3217128ff4ef8128e22cfeb
parentbb9c739806b9f0251fa4a564986e2cb5e92e766e (diff)
downloadcpython-f7010bed894d73c6e4fdc7e8c118395bb4dda238.zip
cpython-f7010bed894d73c6e4fdc7e8c118395bb4dda238.tar.gz
cpython-f7010bed894d73c6e4fdc7e8c118395bb4dda238.tar.bz2
* 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.
-rw-r--r--Lib/test/test_traceback.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/Lib/test/test_traceback.py b/Lib/test/test_traceback.py
index 8b55401..17ed022 100644
--- a/Lib/test/test_traceback.py
+++ b/Lib/test/test_traceback.py
@@ -48,7 +48,7 @@ class TracebackCases(unittest.TestCase):
try:
sys.path.insert(0, testdir)
testfile = os.path.join(testdir, 'test_bug737473.py')
- print >> open(testfile, 'w'), """\
+ print >> open(testfile, 'w'), """
def test():
raise ValueError"""
@@ -62,12 +62,15 @@ def test():
# this loads source code to linecache
traceback.extract_tb(sys.exc_traceback)
- # If this test runs fast, test_bug737473.py will stay in a mtime
- # even if it's rewrited and it'll not reloaded in result. So wait
- # until new timestamp comes.
- time.sleep(2)
+ # If this test runs too quickly, test_bug737473.py's mtime
+ # attribute will remain unchanged even if the file is rewritten.
+ # Consequently, the file would not reload. So, added a sleep()
+ # 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():
raise NotImplementedError"""
reload(test_bug737473)