From 076235e7ec23c27b4afda60daa750684f21c3fd9 Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Sun, 18 Jul 2010 00:06:25 -0700 Subject: [PATCH] Test case for #494, function binding. --- tests/bugs.txt | 1 + tests/run/function_as_method_T494.pyx | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 tests/run/function_as_method_T494.pyx 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 + + -- 2.26.2