Commit f7b5935c authored by Stefan Behnel's avatar Stefan Behnel

adapt test to change in Py3.5

parent be92c8b5
...@@ -21,7 +21,7 @@ except ImportError: ...@@ -21,7 +21,7 @@ except ImportError:
def __init__(self, gen): def __init__(self, gen):
self._gen = gen self._gen = gen
class GeneratorWrapper: class _GeneratorWrapper:
def __init__(self, gen): def __init__(self, gen):
self.__wrapped__ = gen self.__wrapped__ = gen
self.send = gen.send self.send = gen.send
...@@ -76,7 +76,7 @@ class AsyncYield: ...@@ -76,7 +76,7 @@ class AsyncYield:
def run_async(coro): def run_async(coro):
#assert coro.__class__ is types.GeneratorType #assert coro.__class__ is types.GeneratorType
assert coro.__class__.__name__ in ('coroutine', 'GeneratorWrapper'), coro.__class__.__name__ assert coro.__class__.__name__ in ('coroutine', '_GeneratorWrapper'), coro.__class__.__name__
buffer = [] buffer = []
result = None result = None
...@@ -90,7 +90,7 @@ def run_async(coro): ...@@ -90,7 +90,7 @@ def run_async(coro):
def run_async__await__(coro): def run_async__await__(coro):
assert coro.__class__.__name__ in ('coroutine', 'GeneratorWrapper'), coro.__class__.__name__ assert coro.__class__.__name__ in ('coroutine', '_GeneratorWrapper'), coro.__class__.__name__
aw = coro.__await__() aw = coro.__await__()
buffer = [] buffer = []
result = None result = None
......
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