def test_deprecated_noise_level_param_is_alias_for_noise():
    ds = load_dataset(incl_test=True)
    te = H2OTargetEncoderEstimator()
    te.train(y=ds.target, training_frame=ds.train)
    encoded = te.predict(ds.test)
    # print(encoded)
    with warnings.catch_warnings(record=True) as w:
        warnings.simplefilter("always")
        te_nl = H2OTargetEncoderEstimator(noise_level=0)
        assert len(w) == 1
        assert issubclass(w[0].category, H2ODeprecationWarning)
        assert "``noise_level`` param of ``{}`` is deprecated".format(te_init_name) in str(w[0].message)

    te_nl.train(y=ds.target, training_frame=ds.train)
    encoded_nl = te_nl.predict(ds.test)
    # print(encoded_nl)
    te_n = H2OTargetEncoderEstimator(noise=0)
    te_n.train(y=ds.target, training_frame=ds.train)
    encoded_n = te_n.predict(ds.test)
    # print(encoded_n)
    try:
        pu.compare_frames(encoded_nl, encoded, 0, tol_numeric=1e-5)
        assert False, "should have raised"
    except AssertionError as ae:
        assert "should have raised" not in str(ae)
    assert pu.compare_frames(encoded_nl, encoded_n, 0, tol_numeric=1e-5)