[pypy-svn] r73258 - pypy/branch/cpython-extension/pypy/module/cpyext/test

fijal at codespeak.net fijal at codespeak.net
Thu Apr 1 23:22:40 CEST 2010


Author: fijal
Date: Thu Apr  1 23:22:39 2010
New Revision: 73258

Added:
   pypy/branch/cpython-extension/pypy/module/cpyext/test/test_getargs.py   (contents, props changed)
Log:
A failing test


Added: pypy/branch/cpython-extension/pypy/module/cpyext/test/test_getargs.py
==============================================================================
--- (empty file)
+++ pypy/branch/cpython-extension/pypy/module/cpyext/test/test_getargs.py	Thu Apr  1 23:22:39 2010
@@ -0,0 +1,17 @@
+
+from pypy.module.cpyext.test.test_api import BaseApiTest
+from pypy.module.cpyext.test.test_cpyext import AppTestCpythonExtensionBase
+
+class AppTestGetargs(AppTestCpythonExtensionBase):
+    def test_pyarg_parse(self):
+        mod = self.import_extension('foo', [
+            ('oneargint', 'METH_VARARGS',
+             '''
+             int l;
+             #if (!PyArg_Parse(args, "i", &l)) {
+             #    return NULL;
+             #}
+             return PyInt_FromLong(l);
+             '''
+             )])
+        assert mod.oneargint(1) == 1



More information about the Pypy-commit mailing list