[Python-checkins] cpython (3.4): asyncio: test_selector_events: remove duplicate call to _on_handshake() method

victor.stinner python-checkins at python.org
Wed Jul 16 18:05:16 CEST 2014


http://hg.python.org/cpython/rev/bf0e0a7f4795
changeset:   91692:bf0e0a7f4795
branch:      3.4
parent:      91689:8b3f7aecdf85
user:        Victor Stinner <victor.stinner at gmail.com>
date:        Wed Jul 16 18:02:10 2014 +0200
summary:
  asyncio: test_selector_events: remove duplicate call to _on_handshake() method

The _SelectorSslTransport constructor already calls it.

files:
  Lib/test/test_asyncio/test_selector_events.py |  6 +++---
  1 files changed, 3 insertions(+), 3 deletions(-)


diff --git a/Lib/test/test_asyncio/test_selector_events.py b/Lib/test/test_asyncio/test_selector_events.py
--- a/Lib/test/test_asyncio/test_selector_events.py
+++ b/Lib/test/test_asyncio/test_selector_events.py
@@ -1089,17 +1089,17 @@
         self.assertIsNone(waiter.result())
 
     def test_on_handshake_reader_retry(self):
+        self.loop.set_debug(False)
         self.sslsock.do_handshake.side_effect = ssl.SSLWantReadError
         transport = _SelectorSslTransport(
             self.loop, self.sock, self.protocol, self.sslcontext)
-        transport._on_handshake(None)
         self.loop.assert_reader(1, transport._on_handshake, None)
 
     def test_on_handshake_writer_retry(self):
+        self.loop.set_debug(False)
         self.sslsock.do_handshake.side_effect = ssl.SSLWantWriteError
         transport = _SelectorSslTransport(
             self.loop, self.sock, self.protocol, self.sslcontext)
-        transport._on_handshake(None)
         self.loop.assert_writer(1, transport._on_handshake, None)
 
     def test_on_handshake_exc(self):
@@ -1120,7 +1120,7 @@
         exc = BaseException()
         self.sslsock.do_handshake.side_effect = exc
         with test_utils.disable_logger():
-            self.assertRaises(BaseException, transport._on_handshake, None)
+            self.assertRaises(BaseException, transport._on_handshake, 0)
         self.assertTrue(self.sslsock.close.called)
         self.assertTrue(transport._waiter.done())
         self.assertIs(exc, transport._waiter.exception())

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list