Exemplo n.º 1
0
 def test_inet_pton(self):
     '''Tests _socket.inet_pton'''
    
     #sanity
     _socket.inet_pton(_socket.AF_INET, "127.0.0.1")
         
     #negative
     self.assertRaises(_socket.error, _socket.inet_pton, _socket.AF_INET, "garbage dkfjdkfjdkfj")
    def test_inet_pton(self):
        '''Tests _socket.inet_pton'''

        #sanity
        _socket.inet_pton(_socket.AF_INET, "127.0.0.1")

        #negative
        self.assertRaises(_socket.error, _socket.inet_pton, _socket.AF_INET,
                          "garbage dkfjdkfjdkfj")