[pypy-svn] r13216 - pypy/branch/translator-without-old-genc/genc/test
arigo at codespeak.net
arigo at codespeak.net
Thu Jun 9 09:21:30 CEST 2005
Author: arigo
Date: Thu Jun 9 09:21:28 2005
New Revision: 13216
Modified:
pypy/branch/translator-without-old-genc/genc/test/test_typed.py
Log:
Cannot return a list from a compiled function: the rtyper cannot convert from
an rlist to a PyListObject. (This is some kind of deep limitation that would
require more efforts than it's worth ATM.)
Modified: pypy/branch/translator-without-old-genc/genc/test/test_typed.py
==============================================================================
--- pypy/branch/translator-without-old-genc/genc/test/test_typed.py (original)
+++ pypy/branch/translator-without-old-genc/genc/test/test_typed.py Thu Jun 9 09:21:28 2005
@@ -25,6 +25,16 @@
t.checkgraphs()
return skip_missing_compiler(t.ccompile)
+ def test_call_five(self):
+ # -- the result of call_five() isn't a real list, but an rlist
+ # that can't be converted to a PyListObject
+ def wrapper():
+ lst = snippet.call_five()
+ return len(lst), lst[0]
+ call_five = self.getcompiled(snippet.call_five)
+ result = call_five()
+ assert result == (1, 5)
+
def test_int_overflow(self):
fn = self.getcompiled(snippet.add_func)
raises(OverflowError, fn, sys_maxint())
More information about the Pypy-commit
mailing list