[Python-checkins] r71365 - in python/trunk/Lib/test: test_generators.py test_telnetlib.py

benjamin.peterson python-checkins at python.org
Tue Apr 7 17:52:05 CEST 2009


Author: benjamin.peterson
Date: Tue Apr  7 17:52:05 2009
New Revision: 71365

Log:
fix since difference formating of SyntaxErrors

Modified:
   python/trunk/Lib/test/test_generators.py
   python/trunk/Lib/test/test_telnetlib.py

Modified: python/trunk/Lib/test/test_generators.py
==============================================================================
--- python/trunk/Lib/test/test_generators.py	(original)
+++ python/trunk/Lib/test/test_generators.py	Tue Apr  7 17:52:05 2009
@@ -1564,7 +1564,8 @@
 >>> f=lambda: (yield 1),(yield 2)
 Traceback (most recent call last):
   ...
-SyntaxError: 'yield' outside function (<doctest test.test_generators.__test__.coroutine[21]>, line 1)
+  File "<doctest test.test_generators.__test__.coroutine[21]>", line 1
+SyntaxError: 'yield' outside function
 
 >>> def f(): return lambda x=(yield): 1
 Traceback (most recent call last):
@@ -1574,17 +1575,20 @@
 >>> def f(): x = yield = y
 Traceback (most recent call last):
   ...
-SyntaxError: assignment to yield expression not possible (<doctest test.test_generators.__test__.coroutine[23]>, line 1)
+  File "<doctest test.test_generators.__test__.coroutine[23]>", 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 (<doctest test.test_generators.__test__.coroutine[24]>, line 1)
+  File "<doctest test.test_generators.__test__.coroutine[24]>", 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 (<doctest test.test_generators.__test__.coroutine[25]>, line 1)
+  File "<doctest test.test_generators.__test__.coroutine[25]>", line 1
+SyntaxError: augmented assignment to yield expression not possible
 
 
 Now check some throw() conditions:

Modified: python/trunk/Lib/test/test_telnetlib.py
==============================================================================
--- python/trunk/Lib/test/test_telnetlib.py	(original)
+++ python/trunk/Lib/test/test_telnetlib.py	Tue Apr  7 17:52:05 2009
@@ -98,7 +98,7 @@
 
 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)


More information about the Python-checkins mailing list