Commit f7af42b5 authored by Stefan Behnel's avatar Stefan Behnel

Extend test.

parent 1a0c1320
......@@ -37,6 +37,14 @@ class ExtTypeAttributes(object):
self.b = [1, 2, 3]
def func(a, b, c):
"""
>>> func(1, 2, 3)
6
"""
return a + b + c
def test():
import os.path
assert not os.path.basename(__file__).endswith('.py'), __file__
......@@ -46,6 +54,7 @@ def test():
assert not ExtTypePass().__doc__, ExtTypePass().__doc__
assert ExtTypeDocstring().__doc__ == "huhu!", ExtTypeDocstring().__doc__
assert ExtTypePxdDocstring().__doc__ == "ho, ho, ho!", ExtTypePxdDocstring().__doc__
assert '>>> ' in func.__doc__
import doctest
doctest.testmod(verbose=True)
......@@ -64,3 +73,6 @@ cdef class ExtTypePxdDocstring:
cdef class ExtTypeAttributes:
cdef int a
cdef readonly list b
cpdef int func(x, int y, z) except? -1 # argument names should not matter, types should
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