[Python-checkins] cpython (3.3): #18833: add a test for test_telnetlib. Patch by Alex Volkov.

ezio.melotti python-checkins at python.org
Sun Aug 25 23:17:53 CEST 2013


http://hg.python.org/cpython/rev/1b42e483e520
changeset:   85400:1b42e483e520
branch:      3.3
parent:      85394:0e5e5465eb40
user:        Ezio Melotti <ezio.melotti at gmail.com>
date:        Sun Aug 25 23:56:43 2013 +0300
summary:
  #18833: add a test for test_telnetlib.  Patch by Alex Volkov.

files:
  Lib/test/test_telnetlib.py |  8 ++++++++
  Misc/ACKS                  |  1 +
  2 files changed, 9 insertions(+), 0 deletions(-)


diff --git a/Lib/test/test_telnetlib.py b/Lib/test/test_telnetlib.py
--- a/Lib/test/test_telnetlib.py
+++ b/Lib/test/test_telnetlib.py
@@ -75,6 +75,14 @@
         self.assertEqual(telnet.sock.gettimeout(), 30)
         telnet.sock.close()
 
+    def testGetters(self):
+        # Test telnet getter methods
+        telnet = telnetlib.Telnet(HOST, self.port, timeout=30)
+        t_sock = telnet.sock
+        self.assertEqual(telnet.get_socket(), t_sock)
+        self.assertEqual(telnet.fileno(), t_sock.fileno())
+        telnet.sock.close()
+
 class SocketStub(object):
     ''' a socket proxy that re-defines sendall() '''
     def __init__(self, reads=()):
diff --git a/Misc/ACKS b/Misc/ACKS
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -1286,6 +1286,7 @@
 Pauli Virtanen
 Frank Visser
 Johannes Vogel
+Alex Volkov
 Martijn Vries
 Sjoerd de Vries
 Niki W. Waibel

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


More information about the Python-checkins mailing list