Skip to content

Commit 46d26c0

Browse files
committed
soften the comment
1 parent fd4eb21 commit 46d26c0

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

tests/test_asyncio/test_connection.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,8 @@ async def test_read_response__interrupt_does_not_corrupt(exc_type):
135135

136136
with pytest.raises(exc_type):
137137
await conn.send_command("EXISTS non_existent_key")
138-
# due to the interrupt, the integer '0' result of EXISTS will remain on the socket's buffer
138+
# due to the interrupt, the integer '0' result of EXISTS will remain
139+
# on the socket's buffer
139140
with patch.object(socket.socket, "recv", side_effect=exc_type) as mock_recv:
140141
await conn.read_response()
141142
mock_recv.assert_called_once()

tests/test_connection.py

+2-6
Original file line numberDiff line numberDiff line change
@@ -136,12 +136,8 @@ def test_read_response__interrupt_does_not_corrupt(self, exc_type):
136136
# asyncio.exceptions.CancelledError also derives from BaseException
137137
# for same reason.
138138
#
139-
# The notion that one should never `expect:` or `expect BaseException`,
140-
# however, is misguided. It's idiomatic to handle it, to provide
141-
# for exception safety, as long as you re-raise.
142-
#
143-
# with gevent.Timeout(5):
144-
# res = client.exists('my_key')
139+
# What we should ensure, one way or another, is that the connection is
140+
# not left in a corrupted state.
145141

146142
conn.send_command("GET non_existent_key")
147143
resp = conn.read_response()

0 commit comments

Comments
 (0)