mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
This is roughly socket2.diff from issue 1378, with a few changes applied
to ssl.py (no need to test whether we can dup any more). Regular sockets no longer have a _base, but we still have explicit reference counting of socket objects for the benefit of makefile(); using duplicate sockets won't work for SSLSocket.
This commit is contained in:
parent
dd9e3b8736
commit
39eb8fa0db
5 changed files with 126 additions and 118 deletions
|
@ -575,6 +575,15 @@ class BasicTCPTest(SocketConnectedTest):
|
|||
def _testFromFd(self):
|
||||
self.serv_conn.send(MSG)
|
||||
|
||||
def testDup(self):
|
||||
# Testing dup()
|
||||
sock = self.cli_conn.dup()
|
||||
msg = sock.recv(1024)
|
||||
self.assertEqual(msg, MSG)
|
||||
|
||||
def _testDup(self):
|
||||
self.serv_conn.send(MSG)
|
||||
|
||||
def testShutdown(self):
|
||||
# Testing shutdown()
|
||||
msg = self.cli_conn.recv(1024)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue