[Python-checkins] python/dist/src/Lib/test test_socket.py, 1.66,
1.67
montanaro at users.sourceforge.net
montanaro at users.sourceforge.net
Tue Feb 10 10:51:18 EST 2004
Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13305
Modified Files:
test_socket.py
Log Message:
Fix indentation error in testGetServByName and rewrite loop to avoid clumsy
sentinel variable
Index: test_socket.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_socket.py,v
retrieving revision 1.66
retrieving revision 1.67
diff -C2 -d -r1.66 -r1.67
*** test_socket.py 29 Jun 2003 04:40:22 -0000 1.66
--- test_socket.py 10 Feb 2004 15:51:15 -0000 1.67
***************
*** 274,282 ****
# Testing getservbyname()
# try a few protocols - not everyone has telnet enabled
- found = 0
for proto in ("telnet", "ssh", "www", "ftp"):
try:
socket.getservbyname(proto, 'tcp')
- found = 1
break
except socket.error:
--- 274,280 ----
***************
*** 284,293 ****
try:
socket.getservbyname(proto, 'udp')
- found = 1
break
except socket.error:
pass
! if not found:
! raise socket.error
def testDefaultTimeout(self):
--- 282,290 ----
try:
socket.getservbyname(proto, 'udp')
break
except socket.error:
pass
! else:
! raise socket.error
def testDefaultTimeout(self):
More information about the Python-checkins
mailing list