Commit 7d1dc885 authored by da-woods's avatar da-woods Committed by GitHub

Make annotation tests work with non-evaluated annotations (GH-4050)

Backported from 3dc2b9df
Partial fix for https://github.com/cython/cython/issues/3919
parent bb49a03a
...@@ -30,10 +30,10 @@ def anno_gen(x: 'int') -> 'float': ...@@ -30,10 +30,10 @@ def anno_gen(x: 'int') -> 'float':
>>> next(gen) >>> next(gen)
2.0 2.0
>>> ret, arg = sorted(anno_gen.__annotations__.items()) >>> ret, arg = sorted(anno_gen.__annotations__.items())
>>> print(ret[0]); print(ret[1]) >>> print(ret[0]); print(str(ret[1]).strip("'")) # strip makes it pass with/without PEP563
return return
float float
>>> print(arg[0]); print(arg[1]) >>> print(arg[0]); print(str(arg[1]).strip("'"))
x x
int 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