Skip to content

Commit dd61474

Browse files
committed
remove no cover from _badwriteretry
1 parent 44a371a commit dd61474

File tree

2 files changed

+20
-24
lines changed

2 files changed

+20
-24
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
with:
5858
python-version: ${{ matrix.PYTHON.VERSION }}
5959
- run: python -m pip install tox
60-
- run: tox -v
60+
- run: tox -v -- --log-cli-level=DEBUG --show-capture=all
6161
env:
6262
TOXENV: ${{ matrix.PYTHON.TOXENV }}
6363
- uses: ./.github/actions/upload-coverage

tests/test_ssl.py

Lines changed: 19 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3267,29 +3267,25 @@ def _badwriteretry(
32673267
# set buffer size to the minimum of send and receive buffers
32683268
buffer_size = min(sndbuf, rcvbuf) // 2
32693269

3270-
try:
3271-
# --- Main Test Flow ---
3272-
# _attempt_want_write_error() terminates the test
3273-
# if WantWriteError is not triggered
3274-
# The function also returns the message that triggered
3275-
# the WantWriteError so that when we attempt a retry
3276-
# we can ensure a different buffer location is allocated
3277-
# to a the new message we will send for the retry.
3278-
_ = self._attempt_want_write_error(client, buffer_size)
3279-
3280-
# proceed with draining so that a retry has a chance to succeed
3281-
self._drain_server_buffers(server, server_socket)
3282-
3283-
# now attempt the moving buffer retry
3284-
result = self._perform_moving_buffer_test(
3285-
client, buffer_size, want_bad_retry
3286-
)
3287-
except Exception as e: # pragma: no cover
3288-
pytest.fail(f"Unexpected exception during test: {e}.")
3289-
finally:
3290-
self._shutdown_connections(
3291-
client, server, client_socket, server_socket
3292-
)
3270+
# --- Main Test Flow ---
3271+
# _attempt_want_write_error() terminates the test
3272+
# if WantWriteError is not triggered
3273+
# The function also returns the message that triggered
3274+
# the WantWriteError so that when we attempt a retry
3275+
# we can ensure a different buffer location is allocated
3276+
# to a the new message we will send for the retry.
3277+
_ = self._attempt_want_write_error(client, buffer_size)
3278+
3279+
# proceed with draining so that a retry has a chance to succeed
3280+
self._drain_server_buffers(server, server_socket)
3281+
3282+
# now attempt the moving buffer retry
3283+
result = self._perform_moving_buffer_test(
3284+
client, buffer_size, want_bad_retry
3285+
)
3286+
self._shutdown_connections(
3287+
client, server, client_socket, server_socket
3288+
)
32933289

32943290
return result
32953291

0 commit comments

Comments
 (0)