Commit e68c5668 authored by scoder's avatar scoder Committed by GitHub

Merge pull request #1963 from smartsammler/fix-ctyes_def_test

Fix annotation_typing test case
parents 313f0a86 78c5fe5e
...@@ -87,13 +87,13 @@ def pytypes_cdef(a, b=2, c=3, d=4): ...@@ -87,13 +87,13 @@ def pytypes_cdef(a, b=2, c=3, d=4):
def ctypes_def(a: list, b: cython.int = 2, c: cython.long = 3, d: cython.float = 4) -> list: def ctypes_def(a: list, b: cython.int = 2, c: cython.long = 3, d: cython.float = 4) -> list:
""" """
>>> pytypes_def([1]) >>> ctypes_def([1])
('list object', 'Python object', 'Python object', 'double') ('list object', 'int', 'long', 'float')
[1, 2, 3, 4.0] [1, 2, 3, 4.0]
>>> pytypes_def([1], 3) >>> ctypes_def([1], 3)
('list object', 'Python object', 'Python object', 'double') ('list object', 'int', 'long', 'float')
[1, 3, 3, 4.0] [1, 3, 3, 4.0]
>>> pytypes_def(123) >>> ctypes_def(123)
Traceback (most recent call last): Traceback (most recent call last):
TypeError: Argument 'a' has incorrect type (expected list, got int) TypeError: Argument 'a' has incorrect type (expected list, got int)
""" """
......
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