diff Lib/test/test_socket.py @ 12049:dda3794c9cd9 legacy-trunk

Fix the test so that connect() and bind() are called with a single argument: a (host, port) tuple. Like multi-arg append(), multi-arg connect() and bind() may be ruled out!
author Guido van Rossum <guido@python.org>
date Fri, 24 Mar 2000 20:54:29 +0000
parents aedd2d0dcb31
children 72e3cdb32a6c
line wrap: on
line diff
--- a/Lib/test/test_socket.py	Fri Mar 24 20:52:23 2000 +0000
+++ b/Lib/test/test_socket.py	Fri Mar 24 20:54:29 2000 +0000
@@ -97,7 +97,7 @@
     if not canfork or os.fork():
         # parent is server
         s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
-        s.bind(hostname, PORT)
+        s.bind((hostname, PORT))
         s.listen(1)
         if verbose:
             print 'parent accepting'
@@ -133,7 +133,7 @@
             s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
             if verbose:
                 print 'child connecting'
-            s.connect(hostname, PORT)
+            s.connect((hostname, PORT))
             msg = 'socket test'
             s.send(msg)
             data = s.recv(1024)