diff options
author | Guido van Rossum <guido@python.org> | 2007-11-16 01:24:05 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-11-16 01:24:05 (GMT) |
commit | 39eb8fa0dbbcd6568fceb7ca59220aa3281e0cc4 (patch) | |
tree | 5fa187d82123d1055401cb9ae8a4dcd16928bfde /Lib/test/test_socket.py | |
parent | dd9e3b8736fae1f730d027d5383a2b17c661ce82 (diff) | |
download | cpython-39eb8fa0dbbcd6568fceb7ca59220aa3281e0cc4.zip cpython-39eb8fa0dbbcd6568fceb7ca59220aa3281e0cc4.tar.gz cpython-39eb8fa0dbbcd6568fceb7ca59220aa3281e0cc4.tar.bz2 |
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.
Diffstat (limited to 'Lib/test/test_socket.py')
-rw-r--r-- | Lib/test/test_socket.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py index 82eb6e7..c01d998 100644 --- a/Lib/test/test_socket.py +++ b/Lib/test/test_socket.py @@ -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) |