From: Robert Bradshaw Date: Sun, 18 Jul 2010 07:06:25 +0000 (-0700) Subject: Test case for #494, function binding. X-Git-Tag: 0.13.beta0~8 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=076235e7ec23c27b4afda60daa750684f21c3fd9;p=cython.git Test case for #494, function binding. --- diff --git a/tests/bugs.txt b/tests/bugs.txt index fd274296..4f100755 100644 --- a/tests/bugs.txt +++ b/tests/bugs.txt @@ -12,6 +12,7 @@ compile.cpp_operators cpp_templated_ctypedef cpp_structs with_statement_module_level_T536 +function_as_method_T494 # CPython regression tests that don't current work: pyregr.test_threadsignals diff --git a/tests/run/function_as_method_T494.pyx b/tests/run/function_as_method_T494.pyx new file mode 100644 index 00000000..73642352 --- /dev/null +++ b/tests/run/function_as_method_T494.pyx @@ -0,0 +1,13 @@ +__doc__ = """ + >>> A.foo = foo + >>> print A().foo() + +""" + +class A: + pass + +def foo(self): + return self is not None + +