import socket


def is_address_available(host, port):
    """
    Test whether a (host, port) pair is free
    """
    try:
        s = socket.socket()
        s.bind((host, port))
        s.close()
        return True
    except:
        return False