Skip to content

Commit 72f8e25

Browse files
committed
(Merge 3.4) asyncio: test_selector_events: remove duplicate call to
_on_handshake() method The _SelectorSslTransport constructor already calls it.
2 parents 985e8d8 + 1314f06 commit 72f8e25

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Lib/test/test_asyncio/test_selector_events.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1089,17 +1089,17 @@ def test_on_handshake(self):
10891089
self.assertIsNone(waiter.result())
10901090

10911091
def test_on_handshake_reader_retry(self):
1092+
self.loop.set_debug(False)
10921093
self.sslsock.do_handshake.side_effect = ssl.SSLWantReadError
10931094
transport = _SelectorSslTransport(
10941095
self.loop, self.sock, self.protocol, self.sslcontext)
1095-
transport._on_handshake(None)
10961096
self.loop.assert_reader(1, transport._on_handshake, None)
10971097

10981098
def test_on_handshake_writer_retry(self):
1099+
self.loop.set_debug(False)
10991100
self.sslsock.do_handshake.side_effect = ssl.SSLWantWriteError
11001101
transport = _SelectorSslTransport(
11011102
self.loop, self.sock, self.protocol, self.sslcontext)
1102-
transport._on_handshake(None)
11031103
self.loop.assert_writer(1, transport._on_handshake, None)
11041104

11051105
def test_on_handshake_exc(self):
@@ -1120,7 +1120,7 @@ def test_on_handshake_base_exc(self):
11201120
exc = BaseException()
11211121
self.sslsock.do_handshake.side_effect = exc
11221122
with test_utils.disable_logger():
1123-
self.assertRaises(BaseException, transport._on_handshake, None)
1123+
self.assertRaises(BaseException, transport._on_handshake, 0)
11241124
self.assertTrue(self.sslsock.close.called)
11251125
self.assertTrue(transport._waiter.done())
11261126
self.assertIs(exc, transport._waiter.exception())

0 commit comments

Comments
 (0)