@retry_on_failure
def test_getnameinfo():
 socket.getnameinfo(('127.0.0.1', 80), 8)
 socket.getnameinfo(('127.0.0.1', 80), 9)
 (host, service) = socket.getnameinfo(('127.0.0.1', 80), 8)
 AreEqual(service, '80')
 (host, service) = socket.getnameinfo(('127.0.0.1', 80), 0)
 AreEqual(service, 'http')
 AssertError(TypeError, socket.getnameinfo, '127.0.0.1', '0')
 AssertError(TypeError, socket.getnameinfo, ('127.0.0.1', 80, 0, 0, 0), 8)
 AssertError(socket.gaierror, socket.getnameinfo, ('no such host will ever exist', 80), 8)

@ retry_on_failure def test_getnameinfo ( ) : socket . getnameinfo ( ( '127.0.0.1' , 80 ) , 8 ) socket . getnameinfo ( ( '127.0.0.1' , 80 ) , 9 ) ( host , service ) = socket . getnameinfo ( ( '127.0.0.1' , 80 ) , 8 ) AreEqual ( service , '80' ) ( host , service ) = socket . getnameinfo ( ( '127.0.0.1' , 80 ) , 0 ) AreEqual ( service , 'http' ) AssertError ( TypeError , socket . getnameinfo , '127.0.0.1' , '0' ) AssertError ( TypeError , socket . getnameinfo , ( '127.0.0.1' , 80 , 0 , 0 , 0 ) , 8 ) AssertError ( socket . gaierror , socket . getnameinfo , ( 'no such host will ever exist' , 80 ) , 8 )
tests socket .