[pypy-svn] r28261 - pypy/dist/pypy/rpython/test
antocuni at codespeak.net
antocuni at codespeak.net
Sun Jun 4 16:01:25 CEST 2006
Author: antocuni
Date: Sun Jun 4 16:01:24 2006
New Revision: 28261
Modified:
pypy/dist/pypy/rpython/test/test_rbuiltin.py
Log:
(antocuni, nik)
We don't really want hasattr to be tested on ootypesystem.
Modified: pypy/dist/pypy/rpython/test/test_rbuiltin.py
==============================================================================
--- pypy/dist/pypy/rpython/test/test_rbuiltin.py (original)
+++ pypy/dist/pypy/rpython/test/test_rbuiltin.py Sun Jun 4 16:01:24 2006
@@ -305,22 +305,6 @@
res = self.interpret(f, [1])
assert res is False
- def test_hasattr(self):
- self._skip_oo('hasattr')
- class A(object):
- def __init__(self):
- self.x = 42
- def f(i):
- a = A()
- if i==0: return int(hasattr(A, '__init__'))
- if i==1: return int(hasattr(A, 'y'))
- if i==2: return int(hasattr(42, 'x'))
- for x, y in zip(range(3), (1, 0, 0)):
- res = self.interpret(f, [x])
- assert res._obj.value == y
- # hmm, would like to test against PyObj, is this the wrong place/way?
-
-
class TestLLtype(BaseTestExtfunc, LLRtypeMixin):
from pypy.rpython.lltypesystem.module import ll_os
@@ -358,6 +342,20 @@
res = self.interpret(f, [_1_0], someobjects=True)
assert res is False
+ def test_hasattr(self):
+ class A(object):
+ def __init__(self):
+ self.x = 42
+ def f(i):
+ a = A()
+ if i==0: return int(hasattr(A, '__init__'))
+ if i==1: return int(hasattr(A, 'y'))
+ if i==2: return int(hasattr(42, 'x'))
+ for x, y in zip(range(3), (1, 0, 0)):
+ res = self.interpret(f, [x])
+ assert res._obj.value == y
+ # hmm, would like to test against PyObj, is this the wrong place/way?
+
class TestOOtype(BaseTestExtfunc, OORtypeMixin):
from pypy.rpython.ootypesystem.module import ll_os
More information about the Pypy-commit
mailing list