From 0ccbb03add798f84b7dea93c433ba27c213fe395 Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Tue, 13 Aug 2013 00:08:02 -0700 Subject: [PATCH] Common utility types test. --- tests/run/common_utility_types.srctree | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 tests/run/common_utility_types.srctree diff --git a/tests/run/common_utility_types.srctree b/tests/run/common_utility_types.srctree new file mode 100644 index 0000000..c5ea807 --- /dev/null +++ b/tests/run/common_utility_types.srctree @@ -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) -- 2.7.4