From: Benjamin Peterson Date: Tue, 7 Apr 2009 15:52:05 +0000 (+0000) Subject: fix since difference formating of SyntaxErrors X-Git-Tag: v2.7a1~1536 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a1b821cf60493261b450a37092327361b137f140;p=thirdparty%2FPython%2Fcpython.git fix since difference formating of SyntaxErrors --- diff --git a/Lib/test/test_generators.py b/Lib/test/test_generators.py index b7c3fdcbe547..b997ebc16578 100644 --- a/Lib/test/test_generators.py +++ b/Lib/test/test_generators.py @@ -1564,7 +1564,8 @@ Check some syntax errors for yield expressions: >>> f=lambda: (yield 1),(yield 2) Traceback (most recent call last): ... -SyntaxError: 'yield' outside function (, line 1) + File "", line 1 +SyntaxError: 'yield' outside function >>> def f(): return lambda x=(yield): 1 Traceback (most recent call last): @@ -1574,17 +1575,20 @@ SyntaxError: 'return' with argument inside generator (>> def f(): x = yield = y Traceback (most recent call last): ... -SyntaxError: assignment to yield expression not possible (, line 1) + File "", line 1 +SyntaxError: assignment to yield expression not possible >>> def f(): (yield bar) = y Traceback (most recent call last): ... -SyntaxError: can't assign to yield expression (, line 1) + File "", line 1 +SyntaxError: can't assign to yield expression >>> def f(): (yield bar) += y Traceback (most recent call last): ... -SyntaxError: augmented assignment to yield expression not possible (, line 1) + File "", line 1 +SyntaxError: augmented assignment to yield expression not possible Now check some throw() conditions: diff --git a/Lib/test/test_telnetlib.py b/Lib/test/test_telnetlib.py index 16f7f935442b..94b1e73b2359 100644 --- a/Lib/test/test_telnetlib.py +++ b/Lib/test/test_telnetlib.py @@ -98,7 +98,7 @@ class GeneralTests(TestCase): def _read_setUp(self): # the blocking constant should be tuned! - self.blocking_timeout = 0.0 + self.blocking_timeout = 0.1 self.evt = threading.Event() self.dataq = Queue.Queue() self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)