From bb03ac0dae9830968ae971ab53143e2d539d7a3a Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Tue, 21 Mar 2006 18:17:25 +0000 Subject: Correct API design mistake from rev. 43126: make socket attributes readonly properties. --- Lib/test/test_socket.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Lib/test/test_socket.py') diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py index 5a851fc151..592e897532 100644 --- a/Lib/test/test_socket.py +++ b/Lib/test/test_socket.py @@ -469,12 +469,12 @@ class GeneralModuleTests(unittest.TestCase): sock.close() self.assertRaises(socket.error, sock.send, "spam") - def testNewGetMethods(self): - # testing getfamily(), gettype() and getprotocol() + def testNewAttributes(self): + # testing .family, .type and .protocol sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) - self.assertEqual(sock.getfamily(), socket.AF_INET) - self.assertEqual(sock.gettype(), socket.SOCK_STREAM) - self.assertEqual(sock.getproto(), 0) + self.assertEqual(sock.family, socket.AF_INET) + self.assertEqual(sock.type, socket.SOCK_STREAM) + self.assertEqual(sock.proto, 0) sock.close() class BasicTCPTest(SocketConnectedTest): -- cgit v1.2.1