Commit 20685877 authored by Stefan Behnel's avatar Stefan Behnel

Work around Py2 unicode print issue in tests.

parent c67d5089
...@@ -555,7 +555,12 @@ def annotation_syntax(a: "test new test", b : "other" = 2, *args: "ARGS", **kwar ...@@ -555,7 +555,12 @@ def annotation_syntax(a: "test new test", b : "other" = 2, *args: "ARGS", **kwar
async def async_def_annotations(x: 'int') -> 'float': async def async_def_annotations(x: 'int') -> 'float':
""" """
>>> sorted(async_def_annotations.__annotations__.items()) >>> ret, arg = sorted(async_def_annotations.__annotations__.items())
[('return', 'float'), ('x', 'int')] >>> print(ret[0]); print(ret[1])
return
float
>>> print(arg[0]); print(arg[1])
x
int
""" """
return float(x) return float(x)
...@@ -29,7 +29,12 @@ def anno_gen(x: 'int') -> 'float': ...@@ -29,7 +29,12 @@ def anno_gen(x: 'int') -> 'float':
>>> gen = anno_gen(2) >>> gen = anno_gen(2)
>>> next(gen) >>> next(gen)
2.0 2.0
>>> sorted(anno_gen.__annotations__.items()) >>> ret, arg = sorted(anno_gen.__annotations__.items())
[('return', 'float'), ('x', 'int')] >>> print(ret[0]); print(ret[1])
return
float
>>> print(arg[0]); print(arg[1])
x
int
""" """
yield float(x) yield float(x)
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