Commit 26de28a5 authored by Vitja Makarov's avatar Vitja Makarov

Add cyfunction tests

parent e716f95d
# cython: binding=True
# mode: run
# tag: cyfunction
def test_dict():
"""
>>> test_dict.foo = 123
>>> test_dict.__dict__
{'foo': 123}
"""
def test_name():
"""
>>> test_name.__name__
'test_name'
"""
def test_reduce():
"""
>>> import pickle
>>> pickle.loads(pickle.dumps(test_reduce))()
'Hello, world!'
"""
return 'Hello, world!'
def test_method(self):
return self
class BindingTest:
"""
>>> BindingTest.test_method = test_method
>>> BindingTest.test_method() #doctest:+ELLIPSIS
Traceback (most recent call last):
TypeError: ...
>>> BindingTest().test_method()
<BindingTest instance>
"""
def __repr__(self):
return '<BindingTest instance>'
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment