コード例 #1
0
 def test_bgc_window_size_even(self):
     with pytest.raises(ValueError) as exc:
         clean(self.test_image, 200, 10)
コード例 #2
0
 def test_bgc_window_size_negative(self):
     with pytest.raises(ValueError) as exc:
         clean(self.test_image, 200, -3)
     assert exc.value.message == "Window size value must be greater than 0"
コード例 #3
0
 def test_bgc_input_void(self):
     with pytest.raises(IOError) as exc:
         clean(None, 200, 3)
     assert exc.value.message == "Input file can't be None."
コード例 #4
0
 def test_bgc_input_not_found(self):
     with pytest.raises(IOError) as exc:
         clean("fakeRoute", 300, 3)
     assert exc.value.message == "Input file not found."
コード例 #5
0
 def test_bgc_good(self):
     result = clean(self.test_image, 200, 3)
     assert isinstance(result, list) and result is not None