Common utility types test.
authorRobert Bradshaw <robertwb@gmail.com>
Tue, 13 Aug 2013 07:08:02 +0000 (00:08 -0700)
committerRobert Bradshaw <robertwb@gmail.com>
Tue, 13 Aug 2013 07:08:02 +0000 (00:08 -0700)
tests/run/common_utility_types.srctree [new file with mode: 0644]

diff --git a/tests/run/common_utility_types.srctree b/tests/run/common_utility_types.srctree
new file mode 100644 (file)
index 0000000..c5ea807
--- /dev/null
@@ -0,0 +1,34 @@
+PYTHON setup.py build_ext --inplace
+PYTHON -c "import runner"
+
+######## setup.py ########
+
+from Cython.Build.Dependencies import cythonize
+
+from distutils.core import setup
+
+setup(
+  ext_modules = cythonize("*.pyx"),
+)
+
+######## a.pyx ########
+
+# cython: binding=True
+
+def funcA():
+    return
+
+######## b.pyx ########
+
+# cython: binding=True
+
+def funcB():
+    return
+
+######## runner.py ########
+
+print("importing...")
+import a, b
+print(type(a.funcA))
+assert type(a.funcA).__name__ == 'cython_function_or_method'
+assert type(a.funcA) is type(b.funcB)