Skip to content

Commit

Permalink
adjust coverage pragma
Browse files Browse the repository at this point in the history
  • Loading branch information
richardsheridan committed Oct 8, 2023
1 parent 0e18c93 commit 0941d05
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions trio/_tests/test_threads.py
Original file line number Diff line number Diff line change
Expand Up @@ -878,9 +878,8 @@ def sync_check():
from_thread_run_sync(cancel_scope.cancel)
try:
from_thread_run_sync(bool)
except _core.Cancelled:
# pragma: no cover, sync functions don't raise Cancelled
queue.put(True)
except _core.Cancelled: # pragma: no cover
queue.put(True) # sync functions don't raise Cancelled
else:
queue.put(False)

Expand All @@ -903,8 +902,8 @@ def async_check():
from_thread_run_sync(cancel_scope.cancel)
try:
assert from_thread_run(no_checkpoint)
except _core.Cancelled:
queue.put(True)
except _core.Cancelled: # pragma: no cover
queue.put(True) # sync functions don't raise Cancelled
else:
queue.put(False)

Expand Down

0 comments on commit 0941d05

Please sign in to comment.