def h2oinit_fail_invalid_log_level():
    try:
        h2o.init(strict_version_check=False, log_level="BAD_LOG_LEVEL")
        assert False, "Should fail to start an h2o instance with an invalid log level."
    except H2OConnectionError as e:  # some errors are okay like version mismatch
        assert False, "Should fail to start an h2o instance with an invalid log level but H2OConnectionError was thrown."
    except H2OValueError:
        print("H2OValueError properly thrown")
        return
    finally:
        h2o.cluster().shutdown()