@retry_on_failure
def test_gethostbyname_ex():
 joe = socket.gethostbyname_ex('localhost')[2]
 Assert(('127.0.0.1' in joe))
 joe = socket.gethostbyname_ex('127.0.0.1')[2]
 Assert(('127.0.0.1' in joe))
 AssertError(socket.gaierror, socket.gethostbyname_ex, 'should never work')

@ retry_on_failure def test_gethostbyname_ex ( ) : joe = socket . gethostbyname_ex ( 'localhost' ) [ 2 ] Assert ( ( '127.0.0.1' in joe ) ) joe = socket . gethostbyname_ex ( '127.0.0.1' ) [ 2 ] Assert ( ( '127.0.0.1' in joe ) ) AssertError ( socket . gaierror , socket . gethostbyname_ex , 'should never work' )
tests socket .