Skip to content

Commit eab30c4

Browse files
adjust coverage pragma
1 parent 0e18c93 commit eab30c4

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

trio/_tests/test_threads.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -878,9 +878,8 @@ def sync_check():
878878
from_thread_run_sync(cancel_scope.cancel)
879879
try:
880880
from_thread_run_sync(bool)
881-
except _core.Cancelled:
882-
# pragma: no cover, sync functions don't raise Cancelled
883-
queue.put(True)
881+
except _core.Cancelled: # pragma: no cover
882+
queue.put(True) # sync functions don't raise Cancelled
884883
else:
885884
queue.put(False)
886885

@@ -903,8 +902,8 @@ def async_check():
903902
from_thread_run_sync(cancel_scope.cancel)
904903
try:
905904
assert from_thread_run(no_checkpoint)
906-
except _core.Cancelled:
907-
queue.put(True)
905+
except _core.Cancelled: # pragma: no cover
906+
queue.put(True) # async functions raise Cancelled at checkpoints
908907
else:
909908
queue.put(False)
910909

0 commit comments

Comments
 (0)