from a11yviz import check_separability


def test_identical_colors_dE_zero_and_todo():
    out = check_separability(["#1B9E77", "#1B9E77"])
    assert out[0]["delta_e"] == 0
    assert out[0]["status"] == "todo"


def test_widely_spaced_colors_pass():
    out = check_separability(["#000000", "#FFFFFF"])
    assert out[0]["status"] == "ok"
    assert out[0]["delta_e"] > 90


def test_returns_n_choose_2_pairs():
    out = check_separability(["#000000", "#FF0000", "#00FF00"])
    assert len(out) == 3


def test_type_routes_through_simulate_cvd():
    out = check_separability(["#1B9E77", "#D95F02"], type="deutan")
    assert len(out) == 1
