@retry_on_failure
def test_gethostbyname():
 AreEqual(socket.gethostbyname('localhost'), '127.0.0.1')
 AreEqual(socket.gethostbyname('127.0.0.1'), '127.0.0.1')
 AreEqual(socket.gethostbyname('<broadcast>'), '255.255.255.255')
 AssertError(socket.gaierror, socket.gethostbyname, 'should never work')

@ retry_on_failure def test_gethostbyname ( ) : AreEqual ( socket . gethostbyname ( 'localhost' ) , '127.0.0.1' ) AreEqual ( socket . gethostbyname ( '127.0.0.1' ) , '127.0.0.1' ) AreEqual ( socket . gethostbyname ( '<broadcast>' ) , '255.255.255.255' ) AssertError ( socket . gaierror , socket . gethostbyname , 'should never work' )
tests socket .