Test case for #494, function binding.
authorRobert Bradshaw <robertwb@math.washington.edu>
Sun, 18 Jul 2010 07:06:25 +0000 (00:06 -0700)
committerRobert Bradshaw <robertwb@math.washington.edu>
Sun, 18 Jul 2010 07:06:25 +0000 (00:06 -0700)
tests/bugs.txt
tests/run/function_as_method_T494.pyx [new file with mode: 0644]

index fd274296ba5ab816fa8cd15ccdb585b556bf0d9f..4f10075538f9e9cc3bd13d598baabf46c6b74ea1 100644 (file)
@@ -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 (file)
index 0000000..7364235
--- /dev/null
@@ -0,0 +1,13 @@
+__doc__ = """
+    >>> A.foo = foo
+    >>> print A().foo()
+    
+"""
+
+class A:
+    pass
+
+def foo(self):
+    return self is not None
+
+