[pypy-svn] pypy default: Add a modified version of this test with "..." in the expected
arigo
commits-noreply at bitbucket.org
Mon Feb 7 23:10:35 CET 2011
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r41690:6c67cd695980
Date: 2011-02-07 23:10 +0100
http://bitbucket.org/pypy/pypy/changeset/6c67cd695980/
Log: Add a modified version of this test with "..." in the expected
places where there is a difference between CPython and PyPy, which
are, luckily, not too numerous.
diff --git a/lib-python/2.7.0/test/test_extcall.py b/lib-python/modified-2.7.0/test/test_extcall.py
copy from lib-python/2.7.0/test/test_extcall.py
copy to lib-python/modified-2.7.0/test/test_extcall.py
--- a/lib-python/2.7.0/test/test_extcall.py
+++ b/lib-python/modified-2.7.0/test/test_extcall.py
@@ -90,19 +90,19 @@
>>> class Nothing: pass
...
- >>> g(*Nothing())
+ >>> g(*Nothing()) #doctest: +ELLIPSIS
Traceback (most recent call last):
...
- TypeError: g() argument after * must be a sequence, not instance
+ TypeError: ...argument after * must be a sequence, not instance
>>> class Nothing:
... def __len__(self): return 5
...
- >>> g(*Nothing())
+ >>> g(*Nothing()) #doctest: +ELLIPSIS
Traceback (most recent call last):
...
- TypeError: g() argument after * must be a sequence, not instance
+ TypeError: ...argument after * must be a sequence, not instance
>>> class Nothing():
... def __len__(self): return 5
@@ -154,52 +154,50 @@
...
TypeError: g() got multiple values for keyword argument 'x'
- >>> f(**{1:2})
+ >>> f(**{1:2}) #doctest: +ELLIPSIS
Traceback (most recent call last):
...
- TypeError: f() keywords must be strings
+ TypeError: ...keywords must be strings
>>> h(**{'e': 2})
Traceback (most recent call last):
...
TypeError: h() got an unexpected keyword argument 'e'
- >>> h(*h)
+ >>> h(*h) #doctest: +ELLIPSIS
Traceback (most recent call last):
...
- TypeError: h() argument after * must be a sequence, not function
+ TypeError: ...argument after * must be a sequence, not function
- >>> dir(*h)
+ >>> dir(*h) #doctest: +ELLIPSIS
Traceback (most recent call last):
...
- TypeError: dir() argument after * must be a sequence, not function
+ TypeError: ...argument after * must be a sequence, not function
- >>> None(*h)
+ >>> None(*h) #doctest: +ELLIPSIS
Traceback (most recent call last):
...
- TypeError: NoneType object argument after * must be a sequence, \
-not function
+ TypeError: ...argument after * must be a sequence, not function
- >>> h(**h)
+ >>> h(**h) #doctest: +ELLIPSIS
Traceback (most recent call last):
...
- TypeError: h() argument after ** must be a mapping, not function
+ TypeError: ...argument after ** must be a mapping, not function
- >>> dir(**h)
+ >>> dir(**h) #doctest: +ELLIPSIS
Traceback (most recent call last):
...
- TypeError: dir() argument after ** must be a mapping, not function
+ TypeError: ...argument after ** must be a mapping, not function
- >>> None(**h)
+ >>> None(**h) #doctest: +ELLIPSIS
Traceback (most recent call last):
...
- TypeError: NoneType object argument after ** must be a mapping, \
-not function
+ TypeError: ...argument after ** must be a mapping, not function
- >>> dir(b=1, **{'b': 1})
+ >>> dir(b=1, **{'b': 1}) #doctest: +ELLIPSIS
Traceback (most recent call last):
...
- TypeError: dir() got multiple values for keyword argument 'b'
+ TypeError: ...got multiple values for keyword argument 'b'
Another helper function
@@ -247,10 +245,10 @@
... False
True
- >>> id(1, **{'foo': 1})
+ >>> id(1, **{'foo': 1}) #doctest: +ELLIPSIS
Traceback (most recent call last):
...
- TypeError: id() takes no keyword arguments
+ TypeError: id() ... keyword argument...
A corner case of keyword dictionary items being deleted during
the function call setup. See <http://bugs.python.org/issue2016>.
More information about the Pypy-commit
mailing list