@@ -28,10 +28,10 @@ async def source():
28
28
assert await anext (doubles )
29
29
30
30
@mark .asyncio
31
- async def maps_over_async_iterator ():
31
+ async def maps_over_async_iterable ():
32
32
items = [1 , 2 , 3 ]
33
33
34
- class Iterator :
34
+ class Iterable :
35
35
def __aiter__ (self ):
36
36
return self
37
37
@@ -41,7 +41,7 @@ async def __anext__(self):
41
41
except IndexError :
42
42
raise StopAsyncIteration
43
43
44
- doubles = MapAsyncIterator (Iterator (), lambda x : x + x )
44
+ doubles = MapAsyncIterator (Iterable (), lambda x : x + x )
45
45
46
46
values = [value async for value in doubles ]
47
47
@@ -99,10 +99,10 @@ async def source():
99
99
await anext (doubles )
100
100
101
101
@mark .asyncio
102
- async def allows_returning_early_from_mapped_async_iterator ():
102
+ async def allows_returning_early_from_mapped_async_iterable ():
103
103
items = [1 , 2 , 3 ]
104
104
105
- class Iterator :
105
+ class Iterable :
106
106
def __aiter__ (self ):
107
107
return self
108
108
@@ -112,7 +112,7 @@ async def __anext__(self):
112
112
except IndexError : # pragma: no cover
113
113
raise StopAsyncIteration
114
114
115
- doubles = MapAsyncIterator (Iterator (), lambda x : x + x )
115
+ doubles = MapAsyncIterator (Iterable (), lambda x : x + x )
116
116
117
117
assert await anext (doubles ) == 2
118
118
assert await anext (doubles ) == 4
@@ -151,10 +151,10 @@ async def source():
151
151
assert await anext (doubles )
152
152
153
153
@mark .asyncio
154
- async def allows_throwing_errors_through_async_iterators ():
154
+ async def allows_throwing_errors_through_async_iterable ():
155
155
items = [1 , 2 , 3 ]
156
156
157
- class Iterator :
157
+ class Iterable :
158
158
def __aiter__ (self ):
159
159
return self
160
160
@@ -164,7 +164,7 @@ async def __anext__(self):
164
164
except IndexError : # pragma: no cover
165
165
raise StopAsyncIteration
166
166
167
- doubles = MapAsyncIterator (Iterator (), lambda x : x + x )
167
+ doubles = MapAsyncIterator (Iterable (), lambda x : x + x )
168
168
169
169
assert await anext (doubles ) == 2
170
170
assert await anext (doubles ) == 4
0 commit comments