]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix the test so that connect() and bind() are called with a single
authorGuido van Rossum <guido@python.org>
Fri, 24 Mar 2000 20:54:29 +0000 (20:54 +0000)
committerGuido van Rossum <guido@python.org>
Fri, 24 Mar 2000 20:54:29 +0000 (20:54 +0000)
argument: a (host, port) tuple.

Like multi-arg append(), multi-arg connect() and bind() may be ruled out!

Lib/test/test_socket.py

index 772b86ba83ff62564f1a3668d716966ef257b5b7..83135f902973c33aacf3bef7533a3700ebebaced 100644 (file)
@@ -97,7 +97,7 @@ try:
     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 @@ try:
             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)