summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2013-08-25 21:17:21 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2013-08-25 21:17:21 (GMT)
commitec42975bc66706554ae29b3884bdaaa6b26c487c (patch)
tree4e7f428e153c53dcb9ccab73d3b99d1ffcfbda7b /Lib
parent7eaf3f7080a0b0e1e551d2d9d2dcddd54d53af59 (diff)
parent4f1353ab10792f47a51c37f1384f036a1679aec0 (diff)
downloadcpython-ec42975bc66706554ae29b3884bdaaa6b26c487c.zip
cpython-ec42975bc66706554ae29b3884bdaaa6b26c487c.tar.gz
cpython-ec42975bc66706554ae29b3884bdaaa6b26c487c.tar.bz2
#18833: merge with 3.3.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_telnetlib.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_telnetlib.py b/Lib/test/test_telnetlib.py
index 11e95e7..c9f2ccb 100644
--- a/Lib/test/test_telnetlib.py
+++ b/Lib/test/test_telnetlib.py
@@ -75,6 +75,14 @@ class GeneralTests(TestCase):
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=()):