예제 #1
0
def test_limits_reducer_source():
    low, high = 42, 1729
    action = colors.set_source_limits(low, high)
    state = colors.limits_reducer({}, action)
    origin = "column_data_source"
    assert state["colorbar"]["limits"][origin]["low"] == low
    assert state["colorbar"]["limits"][origin]["high"] == high
예제 #2
0
def test_limits_reducer_user_low():
    number = 42
    action = colors.set_user_low(number)
    state = colors.limits_reducer({}, action)
    origin = "user"
    assert state["colorbar"]["limits"][origin]["low"] == number
예제 #3
0
def test_limits_reducer_origin():
    text = "foo"
    action = colors.set_limits_origin(text)
    state = colors.limits_reducer({}, action)
    assert state["colorbar"]["limits"]["origin"] == text