def test_update_cmap(): """Should update the colormap.""" cm = colormap.cmap.get("viridis") val = {1: [0, 0, 0], 2: [255, 255, 255, 255]} colormap._update_cmap(cm, val) assert cm[1] == [0, 0, 0, 255] assert cm[2] == [255, 255, 255, 255]
def test_update_cmap(): """Should update the colormap.""" cm = colormap.cmap.get("viridis") val = {1: (0, 0, 0, 0), 2: (255, 255, 255, 255)} colormap._update_cmap(cm, val) assert cm[1] == (0, 0, 0, 0) assert cm[2] == (255, 255, 255, 255)