def test_unlock_free_port(self): for port in [63419, 59284, 47231]: if not _port_is_bound(HOST, port): id = '%s@%d' % (HOST, port) self.ra.lock( id ) self.ra.unlock( id ) return print("SKIP test_unlock_free_port -- couldn't find free port")
def test_unlock_free_port(self): for port in [63419, 59284, 47231]: if not _port_is_bound(HOST, port): id = '%s@%d' % (HOST, port) self.ra.lock(id) self.ra.unlock(id) return print("SKIP test_unlock_free_port -- couldn't find free port")
def test_unlock_busy_port(self): for port in [22, 25, 3389, 111, 631]: if _port_is_bound(HOST, port): id = '%s@%d' % (HOST, port) self.ra.lock( id ) self.cleanup.append(id) self.assertRaises(Exception, self.ra.unlock, id ) return print("SKIP test_unlock_busy_port -- couldn't find busy port")
def test_unlock_busy_port(self): for port in [22, 25, 3389, 111, 631]: if _port_is_bound(HOST, port): id = '%s@%d' % (HOST, port) self.ra.lock(id) self.cleanup.append(id) self.assertRaises(Exception, self.ra.unlock, id) return print("SKIP test_unlock_busy_port -- couldn't find busy port")