diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/basics/async_for.py | 2 | ||||
| -rw-r--r-- | tests/basics/async_for2.py | 5 | ||||
| -rw-r--r-- | tests/basics/async_for2.py.exp | 4 |
3 files changed, 3 insertions, 8 deletions
diff --git a/tests/basics/async_for.py b/tests/basics/async_for.py index 6b4e136d5..5fd054082 100644 --- a/tests/basics/async_for.py +++ b/tests/basics/async_for.py @@ -6,7 +6,7 @@ class AsyncIteratorWrapper: print('init') self._it = iter(obj) - async def __aiter__(self): + def __aiter__(self): print('aiter') return self diff --git a/tests/basics/async_for2.py b/tests/basics/async_for2.py index 89584fcb1..aad23a3e5 100644 --- a/tests/basics/async_for2.py +++ b/tests/basics/async_for2.py @@ -1,4 +1,4 @@ -# test waiting within "async for" aiter/anext functions +# test waiting within "async for" __anext__ function import sys if sys.implementation.name == 'micropython': @@ -21,9 +21,8 @@ class ARange: self.cur = 0 self.high = high - async def __aiter__(self): + def __aiter__(self): print('aiter') - print('f returned:', await f(10)) return self async def __anext__(self): diff --git a/tests/basics/async_for2.py.exp b/tests/basics/async_for2.py.exp index 886232f7b..52bbe90c8 100644 --- a/tests/basics/async_for2.py.exp +++ b/tests/basics/async_for2.py.exp @@ -1,9 +1,5 @@ init aiter -f start: 10 -coro yielded: 11 -coro yielded: 12 -f returned: 13 anext f start: 20 coro yielded: 21 |
