def test_hue_pal(): palette = hue_pal() result = palette(5) assert all(s[0] == '#' and len(s) == 7 for s in result) # branches # with pytest.raises(ValueError): hue_pal(.1, 2.3, 3) with pytest.raises(ValueError): hue_pal(color_space='slh')
def __init__(self, h=.01, l=.6, s=.65, color_space='hls', **kwargs): self.palette = hue_pal(h, l, s, color_space=color_space) scale_discrete.__init__(self, **kwargs)