def run_test(sys_args, test_to_run):
    global _IPYNB_
    parse_args(sys_args)
    h2o.init(ip=_H2O_IP_, port=_H2O_PORT_, strict_version_check=False)
    h2o.log_and_echo("------------------------------------------------------------")
    h2o.log_and_echo("")
    h2o.log_and_echo("STARTING TEST: "+str(h2o.ou()))
    h2o.log_and_echo("")
    h2o.log_and_echo("------------------------------------------------------------")
    # num_keys = h2o.store_size()
    try:
        if _IPYNB_: utils.ipy_notebook_exec(_IPYNB_, save_and_norun=False)
        else: test_to_run()
    finally:
        h2o.remove_all()
Example #2
0
def run_test(sys_args, test_to_run):
    # import pkg_resources
    # ver = pkg_resources.get_distribution("h2o").version
    # print "H2O PYTHON PACKAGE VERSION: " + str(ver)
    ip, port = sys_args[2].split(":")
    h2o.init(ip,port,strict_version_check=False)
    h2o.log_and_echo("------------------------------------------------------------")
    h2o.log_and_echo("")
    h2o.log_and_echo("STARTING TEST: "+str(h2o.ou()))
    h2o.log_and_echo("")
    h2o.log_and_echo("------------------------------------------------------------")
    num_keys = h2o.store_size()
    try:
        if len(sys_args) > 3 and sys_args[3] == "--ipynb": utils.ipy_notebook_exec(sys_args[4],save_and_norun=False)
        else: test_to_run(ip, port)
    finally:
        h2o.remove_all()
        if h2o.keys_leaked(num_keys): print "Leaked Keys!"
Example #3
0
def run_test(sys_args, test_to_run):
    # import pkg_resources
    # ver = pkg_resources.get_distribution("h2o").version
    # print "H2O PYTHON PACKAGE VERSION: " + str(ver)
    ip, port = sys_args[2].split(":")
    h2o.init(ip, port, strict_version_check=False)
    h2o.log_and_echo(
        "------------------------------------------------------------")
    h2o.log_and_echo("")
    h2o.log_and_echo("STARTING TEST: " + str(h2o.ou()))
    h2o.log_and_echo("")
    h2o.log_and_echo(
        "------------------------------------------------------------")
    num_keys = h2o.store_size()
    try:
        if len(sys_args) > 3 and sys_args[3] == "--ipynb":
            utils.ipy_notebook_exec(sys_args[4], save_and_norun=False)
        else:
            test_to_run(ip, port)
    finally:
        h2o.remove_all()
        if h2o.keys_leaked(num_keys): print "Leaked Keys!"