File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -410,13 +410,21 @@ def check(
410
410
# 1 for call_soon_task
411
411
check (expected_monitors = 0 , expected_readers = 1 , expected_writers = 0 )
412
412
413
- with _core .monitor_kevent (a1 .fileno (), select .KQ_FILTER_READ ):
413
+ with _core .monitor_kevent (a1 .fileno (), select .KQ_FILTER_READ ) as q :
414
414
with (
415
415
pytest .raises (_core .BusyResourceError ),
416
416
_core .monitor_kevent (a1 .fileno (), select .KQ_FILTER_READ ),
417
417
):
418
418
pass # pragma: no cover
419
419
check (expected_monitors = 1 , expected_readers = 1 , expected_writers = 0 )
420
+ b1 .write (b"\x00 " )
421
+ with trio .fail_after (1 ):
422
+ await q .receive ()
423
+
424
+ _core .notify_closing (a1 )
425
+ a1 .close ()
426
+ with trio .fail_after (1 ):
427
+ assert len ([v async for v in q ]) == 0
420
428
421
429
check (expected_monitors = 0 , expected_readers = 1 , expected_writers = 0 )
422
430
You can’t perform that action at this time.
0 commit comments