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
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
def test_limits_reducer_origin(): text = "foo" action = colors.set_limits_origin(text) state = colors.limits_reducer({}, action) assert state["colorbar"]["limits"]["origin"] == text