[pypy-svn] r50946 - pypy/dist/pypy/objspace/test
cfbolz at codespeak.net
cfbolz at codespeak.net
Wed Jan 23 20:43:45 CET 2008
Author: cfbolz
Date: Wed Jan 23 20:43:44 2008
New Revision: 50946
Modified:
pypy/dist/pypy/objspace/test/test_reflective.py
Log:
simplify test
Modified: pypy/dist/pypy/objspace/test/test_reflective.py
==============================================================================
--- pypy/dist/pypy/objspace/test/test_reflective.py (original)
+++ pypy/dist/pypy/objspace/test/test_reflective.py Wed Jan 23 20:43:44 2008
@@ -121,15 +121,8 @@
return obj
def is_(self, space, a, b):
return self.replace(a) is self.replace(b)
- def __getattr__(self, name):
- if name in ["repr", "type"]:
- def f(space, *args):
- newargs = []
- for arg in args:
- newargs.append(self.replace(arg))
- return getattr(space, name)(*newargs)
- return f
- raise AttributeError
+ def type(self, space, a):
+ return type(self.replace(a))
set_reflectivespace(Space())
assert IAmNone is None
assert type(IAmNone) is type(None)
@@ -139,6 +132,7 @@
a = A()
assert a.x == 1
raises(AttributeError, "a.x = 2")
+ set_reflectivespace(None)
def test_autocurry(self):
More information about the Pypy-commit
mailing list