[pypy-svn] r20493 - pypy/branch/somepbc-refactoring/pypy/translator/test
arigo at codespeak.net
arigo at codespeak.net
Thu Dec 1 14:40:17 CET 2005
Author: arigo
Date: Thu Dec 1 14:40:16 2005
New Revision: 20493
Modified:
pypy/branch/somepbc-refactoring/pypy/translator/test/test_annrpython.py
Log:
a failing annotation test.
Modified: pypy/branch/somepbc-refactoring/pypy/translator/test/test_annrpython.py
==============================================================================
--- pypy/branch/somepbc-refactoring/pypy/translator/test/test_annrpython.py (original)
+++ pypy/branch/somepbc-refactoring/pypy/translator/test/test_annrpython.py Thu Dec 1 14:40:16 2005
@@ -1871,6 +1871,19 @@
assert s.items[0].knowntype == int
assert s.items[1].knowntype == str
+ def test_constant_bound_method(self):
+ class C:
+ def __init__(self, value):
+ self.value = value
+ def meth(self):
+ return self.value
+ meth = C(1).meth
+ def f():
+ return meth()
+ a = self.RPythonAnnotator()
+ s = a.build_types(f, [])
+ assert s.knowntype == int
+
def g(n):
return [0,1,2,n]
More information about the Pypy-commit
mailing list