@@ -21,7 +21,7 @@ async def map_function(n, map_interval=0):
21
21
return n * 2
22
22
23
23
results = []
24
- async for result in Pipeline (map_function , data = producer (10 )):
24
+ async for result in Pipeline (producer (10 ), map_function ):
25
25
results .append (result )
26
26
27
27
assert results == list (range (0 , 20 , 2 ))
@@ -38,7 +38,7 @@ def map_function(n, map_interval=0):
38
38
return n * 2
39
39
40
40
results = []
41
- async for result in Pipeline (map_function , data = producer (10 )):
41
+ async for result in Pipeline (producer (10 ), map_function ):
42
42
results .append (result )
43
43
44
44
assert results == list (range (0 , 20 , 2 ))
@@ -59,7 +59,7 @@ async def f2(v):
59
59
return v + 1
60
60
61
61
results = []
62
- async for result in Pipeline (map_function , f2 , data = producer (10 )):
62
+ async for result in Pipeline (producer (10 ), map_function , f2 ):
63
63
results .append (result )
64
64
65
65
assert results == [n * 2 + 1 for n in range (10 )]
@@ -88,7 +88,7 @@ async def map_function(n):
88
88
89
89
results = []
90
90
async for result in Pipeline (
91
- map_function , data = producer (task_amount ), max_concurrency = None
91
+ producer (task_amount ), map_function , max_concurrency = None
92
92
):
93
93
results .append (result )
94
94
@@ -130,7 +130,7 @@ async def map_function(n):
130
130
131
131
results = []
132
132
async for result in Pipeline (
133
- map_function , data = producer (task_amount ), max_concurrency = max_concurrency
133
+ producer (task_amount ), map_function , max_concurrency = max_concurrency
134
134
):
135
135
results .append (result )
136
136
@@ -216,7 +216,9 @@ async def stage(value):
216
216
await asyncio .sleep (int (f"{ value :02d} " [::- 1 ]) / 200 )
217
217
return value
218
218
219
- assert await Pipeline (stage , data = generator (100 ), preserve_order = True ).results () == list (range (100 ))
219
+ assert await Pipeline (generator (100 ), stage , preserve_order = True ).results () == list (
220
+ range (100 )
221
+ )
220
222
221
223
222
224
@pytest .mark .asyncio
@@ -234,7 +236,9 @@ async def map_function(n):
234
236
try :
235
237
async with asyncio .timeout (0.1 ):
236
238
try :
237
- async for result in Pipeline (map_function , data = producer (1 ), on_error = "strict" ):
239
+ async for result in Pipeline (
240
+ producer (1 ), map_function , on_error = "strict"
241
+ ):
238
242
results .append (result )
239
243
except* Exception :
240
244
# for this specific test, any other outcome is good.
@@ -276,51 +280,34 @@ async def map_function(n):
276
280
277
281
@pytest .mark .skip
278
282
@pytest .mark .asyncio
279
- async def test_pipeline_reorder_results ():
280
- ...
283
+ async def test_pipeline_reorder_results (): ...
284
+
281
285
282
286
@pytest .mark .skip
283
287
@pytest .mark .asyncio
284
- async def test_pipeline_add_stage_pipe_operator ():
285
-
286
- ...
287
-
288
+ async def test_pipeline_add_stage_pipe_operator (): ...
288
289
289
290
290
291
@pytest .mark .skip
291
292
@pytest .mark .asyncio
292
- async def test_pipeline_add_data_and_execute_l_rhift_operator ():
293
-
294
- ...
293
+ async def test_pipeline_add_data_and_execute_l_rhift_operator (): ...
295
294
296
295
297
296
@pytest .mark .skip
298
297
@pytest .mark .asyncio
299
- async def test_pipeline_store_result_r_rshift_operator ():
300
- ...
298
+ async def test_pipeline_store_result_r_rshift_operator (): ...
301
299
302
300
303
301
@pytest .mark .skip
304
302
@pytest .mark .asyncio
305
- async def test_pipeline_fine_tune_stages ():
306
- ...
303
+ async def test_pipeline_fine_tune_stages (): ...
307
304
308
305
309
306
@pytest .mark .skip
310
307
@pytest .mark .asyncio
311
- async def test_pipeline_concurrency_rate_limit ():
312
- ...
308
+ async def test_pipeline_concurrency_rate_limit (): ...
313
309
314
310
315
311
@pytest .mark .skip
316
312
@pytest .mark .asyncio
317
- async def test_pipeline_max_simultaneous_record_limit ():
318
- ...
319
-
320
-
321
-
322
-
323
-
324
-
325
-
326
-
313
+ async def test_pipeline_max_simultaneous_record_limit (): ...
0 commit comments