def test_color_histogram(): image = skimage.img_as_float(data.load('color.png')) viewer = ImageViewer(image) ch = ColorHistogram(dock='right') viewer += ch assert_almost_equal(viewer.image.std(), 0.352, 3), ch.ab_selected((0, 100, 0, 100)), assert_almost_equal(viewer.image.std(), 0.325, 3)