def test_th_over_thresh(self):
     with pytest.raises(ValueError) as exc:
         apply(self.test_image, 270)
     assert exc.value.message == "All threshold values must be between 0 and 255"
 def test_th_multi_th(self):
     result = apply(self.test_image, [220, 230, 250])
     assert isinstance(result, list) and result is not None
 def test_th_img_none(self):
     with pytest.raises(IOError) as exc:
         apply(None, 150)
     assert exc.value.message == "Input file can't be None."
 def test_th_single_th(self):
     result = apply(self.test_image, 150)
     assert isinstance(result, list) and result is not None