예제 #1
0
 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"
예제 #2
0
 def test_th_multi_th(self):
     result = apply(self.test_image, [220, 230, 250])
     assert isinstance(result, list) and result is not None
예제 #3
0
 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."
예제 #4
0
 def test_th_single_th(self):
     result = apply(self.test_image, 150)
     assert isinstance(result, list) and result is not None