def test_brightness_neg_clip(self): cm.brightness(self.img, self.state, 0, 0) assert_array_equal(self.img, np.zeros_like(self.img))
def test_brightness_neg(self): cm.brightness(self.img, self.state, 0.5, -50) assert_array_equal(self.img, np.ones_like(self.img) * 50)
def test_brightness_pos_clip(self): cm.brightness(self.img, self.state, 2, 0) assert_array_equal(self.img, np.ones_like(self.img) * 255)
def test_brightness_pos(self): cm.brightness(self.img, self.state, 1.25, 1) assert_array_equal(self.img, np.ones_like(self.img) * 251)