[pypy-svn] r60939 - pypy/trunk/lib-python/modified-2.5.2/test
antocuni at codespeak.net
antocuni at codespeak.net
Wed Jan 14 11:41:56 CET 2009
Author: antocuni
Date: Wed Jan 14 11:41:55 2009
New Revision: 60939
Modified:
pypy/trunk/lib-python/modified-2.5.2/test/test_genexps.py
Log:
I hate doctests. Fix error messages to match pypy's one
Modified: pypy/trunk/lib-python/modified-2.5.2/test/test_genexps.py
==============================================================================
--- pypy/trunk/lib-python/modified-2.5.2/test/test_genexps.py (original)
+++ pypy/trunk/lib-python/modified-2.5.2/test/test_genexps.py Wed Jan 14 11:41:55 2009
@@ -84,10 +84,10 @@
Verify that parenthesis are required when used as a keyword argument value
- >>> dict(a = i for i in xrange(10))
+ >>> dict(a = i for i in xrange(10)) #doctest: +ELLIPSIS
Traceback (most recent call last):
...
- SyntaxError: invalid syntax
+ SyntaxError: invalid syntax...
Verify that parenthesis are required when used as a keyword argument value
@@ -109,7 +109,7 @@
Traceback (most recent call last):
File "<pyshell#4>", line 1, in -toplevel-
(i for i in 6)
- TypeError: 'int' object is not iterable
+ TypeError: iteration over non-sequence
Verify late binding for the outermost if-expression
@@ -134,15 +134,15 @@
Verify that syntax error's are raised for genexps used as lvalues
- >>> (y for y in (1,2)) = 10
+ >>> (y for y in (1,2)) = 10 #doctest: +ELLIPSIS
Traceback (most recent call last):
...
- SyntaxError: assign to generator expression not possible
+ SyntaxError: assign to generator expression not possible...
- >>> (y for y in (1,2)) += 10
+ >>> (y for y in (1,2)) += 10 #doctest: +ELLIPSIS
Traceback (most recent call last):
...
- SyntaxError: augmented assign to tuple literal or generator expression not possible
+ SyntaxError: augmented assign to tuple literal or generator expression not possible...
@@ -223,7 +223,7 @@
True
>>> print g.next.__doc__
- x.next() -> the next value, or raise StopIteration
+ next() -> the next value, or raise StopIteration
>>> import types
>>> isinstance(g, types.GeneratorType)
True
More information about the Pypy-commit
mailing list