From eab30c4b4ce9b0d1cae192e707bf01858d704e8f Mon Sep 17 00:00:00 2001 From: richardsheridan Date: Sun, 8 Oct 2023 19:31:47 -0400 Subject: [PATCH] adjust coverage pragma --- trio/_tests/test_threads.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/trio/_tests/test_threads.py b/trio/_tests/test_threads.py index fb1682984b..24b450cc59 100644 --- a/trio/_tests/test_threads.py +++ b/trio/_tests/test_threads.py @@ -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) @@ -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) # async functions raise Cancelled at checkpoints else: queue.put(False)