Rename gather_with_concurrency to gather_with_limited_concurrency (#102241)

* Rename gather_with_concurrency to gather_with_limited_concurrency

* Update test
This commit is contained in:
Erik Montnemery 2023-10-19 15:08:52 +02:00 committed by GitHub
parent 4498c2e8c4
commit dff18b4a16
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 17 additions and 15 deletions

View file

@ -183,8 +183,8 @@ async def test_protect_loop_debugger_sleep(caplog: pytest.LogCaptureFixture) ->
assert "Detected blocking call inside the event loop" not in caplog.text
async def test_gather_with_concurrency() -> None:
"""Test gather_with_concurrency limits the number of running tasks."""
async def test_gather_with_limited_concurrency() -> None:
"""Test gather_with_limited_concurrency limits the number of running tasks."""
runs = 0
now_time = time.time()
@ -198,7 +198,7 @@ async def test_gather_with_concurrency() -> None:
await asyncio.sleep(0.1)
return runs
results = await hasync.gather_with_concurrency(
results = await hasync.gather_with_limited_concurrency(
2, *(_increment_runs_if_in_time() for i in range(4))
)