[pypy-svn] r59487 - pypy/trunk/lib-python/modified-2.5.2/test
arigo at codespeak.net
arigo at codespeak.net
Tue Oct 28 16:51:19 CET 2008
Author: arigo
Date: Tue Oct 28 16:51:17 2008
New Revision: 59487
Added:
pypy/trunk/lib-python/modified-2.5.2/test/test_descr.py
- copied, changed from r59421, pypy/trunk/lib-python/2.5.2/test/test_descr.py
Log:
Start to fix test_descr from scratch. This time the goal is to make
it fully pass on both python2.5 and pypy-c, with possibly a few
"impl_detail" checks.
Copied: pypy/trunk/lib-python/modified-2.5.2/test/test_descr.py (from r59421, pypy/trunk/lib-python/2.5.2/test/test_descr.py)
==============================================================================
--- pypy/trunk/lib-python/2.5.2/test/test_descr.py (original)
+++ pypy/trunk/lib-python/modified-2.5.2/test/test_descr.py Tue Oct 28 16:51:17 2008
@@ -21,7 +21,9 @@
m = getattr(t, meth)
while meth not in t.__dict__:
t = t.__bases__[0]
- vereq(m, t.__dict__[meth])
+ # in some implementations (e.g. PyPy), 'm' can be a regular unbound
+ # method object; the getattr() below obtains its underlying function.
+ vereq(getattr(m, 'im_func', m), t.__dict__[meth])
vereq(m(a), res)
bm = getattr(a, meth)
vereq(bm(), res)
@@ -39,7 +41,9 @@
m = getattr(t, meth)
while meth not in t.__dict__:
t = t.__bases__[0]
- vereq(m, t.__dict__[meth])
+ # in some implementations (e.g. PyPy), 'm' can be a regular unbound
+ # method object; the getattr() below obtains its underlying function.
+ vereq(getattr(m, 'im_func', m), t.__dict__[meth])
vereq(m(a, b), res)
bm = getattr(a, meth)
vereq(bm(b), res)
@@ -52,7 +56,9 @@
m = getattr(t, meth)
while meth not in t.__dict__:
t = t.__bases__[0]
- vereq(m, t.__dict__[meth])
+ # in some implementations (e.g. PyPy), 'm' can be a regular unbound
+ # method object; the getattr() below obtains its underlying function.
+ vereq(getattr(m, 'im_func', m), t.__dict__[meth])
vereq(m(a, b, c), res)
bm = getattr(a, meth)
vereq(bm(b, c), res)
@@ -66,7 +72,9 @@
m = getattr(t, meth)
while meth not in t.__dict__:
t = t.__bases__[0]
- vereq(m, t.__dict__[meth])
+ # in some implementations (e.g. PyPy), 'm' can be a regular unbound
+ # method object; the getattr() below obtains its underlying function.
+ vereq(getattr(m, 'im_func', m), t.__dict__[meth])
dict['a'] = deepcopy(a)
m(dict['a'], b)
vereq(dict['a'], res)
@@ -84,7 +92,9 @@
m = getattr(t, meth)
while meth not in t.__dict__:
t = t.__bases__[0]
- vereq(m, t.__dict__[meth])
+ # in some implementations (e.g. PyPy), 'm' can be a regular unbound
+ # method object; the getattr() below obtains its underlying function.
+ vereq(getattr(m, 'im_func', m), t.__dict__[meth])
dict['a'] = deepcopy(a)
m(dict['a'], b, c)
vereq(dict['a'], res)
@@ -102,7 +112,9 @@
while meth not in t.__dict__:
t = t.__bases__[0]
m = getattr(t, meth)
- vereq(m, t.__dict__[meth])
+ # in some implementations (e.g. PyPy), 'm' can be a regular unbound
+ # method object; the getattr() below obtains its underlying function.
+ vereq(getattr(m, 'im_func', m), t.__dict__[meth])
dict['a'] = deepcopy(a)
m(dict['a'], b, c, d)
vereq(dict['a'], res)
More information about the Pypy-commit
mailing list