[Python-checkins] CVS: python/dist/src/Lib/test test_socket.py,1.12,1.13

Guido van Rossum python-dev@python.org
2000年3月24日 15:54:31 -0500 (EST)


Update of /projects/cvsroot/python/dist/src/Lib/test
In directory eric:/projects/python/develop/guido/src/Lib/test
Modified Files:
	test_socket.py 
Log Message:
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!
Index: test_socket.py
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Lib/test/test_socket.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** test_socket.py	1998年03月26日 19:42:45	1.12
--- test_socket.py	2000年03月24日 20:54:29	1.13
***************
*** 98,102 ****
 # parent is server
 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
! s.bind(hostname, PORT)
 s.listen(1)
 if verbose:
--- 98,102 ----
 # parent is server
 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
! s.bind((hostname, PORT))
 s.listen(1)
 if verbose:
***************
*** 134,138 ****
 if verbose:
 print 'child connecting'
! s.connect(hostname, PORT)
 msg = 'socket test'
 s.send(msg)
--- 134,138 ----
 if verbose:
 print 'child connecting'
! s.connect((hostname, PORT))
 msg = 'socket test'
 s.send(msg)

AltStyle によって変換されたページ (->オリジナル) /