We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bf1f270 commit 4ef6ba8Copy full SHA for 4ef6ba8
1 file changed
src/trio/_tests/test_sync.py
@@ -242,17 +242,20 @@ async def test_CapacityLimiter_zero_limit_tokens() -> None:
242
await c.acquire_on_behalf_of(0) # total_tokens is 1
243
244
nursery.start_soon(c.acquire_on_behalf_of, 1)
245
+ await wait_all_tasks_blocked()
246
c.total_tokens = 0
247
248
assert c.statistics().borrowers == [0]
249
250
c.release_on_behalf_of(0)
251
252
assert c.statistics().borrowers == []
- assert c.statistics().tasks_waiting == 0
253
+ assert c.statistics().tasks_waiting == 1
254
255
c.total_tokens = 1
256
await wait_all_tasks_blocked()
257
assert c.statistics().borrowers == [1]
258
+ assert c.statistics().tasks_waiting == 0
259
260
c.release_on_behalf_of(1)
261
0 commit comments