예제 #1
0
 def test_sp_input_void(self):
     with pytest.raises(IOError) as exc:
         clean('', 250, 3, 3)
     assert exc.value.message == "Input file can't be ''."
예제 #2
0
 def test_sp_input_not_found(self):
     with pytest.raises(IOError) as exc:
         clean("fakeRoute", 250, 3, 3)
     assert exc.value.message == "Input file not found."
예제 #3
0
 def test_sp_input_none(self):
     with pytest.raises(IOError) as exc:
         clean(None, 250, 3, 3)
     assert exc.value.message == "Input file can't be None."
예제 #4
0
 def test_sp_even_kernel(self):
     with pytest.raises(ValueError) as exc:
         clean(self.test_image, 250, 3, 2)
     assert exc.value.message == "Kernel size value must be odd."
예제 #5
0
 def test_sp_even_window(self):
     with pytest.raises(ValueError) as exc:
         clean(self.test_image, 250, 2, 3)
     assert exc.value.message == "Window size value must be odd."
예제 #6
0
 def test_sp_negative_kernel(self):
     with pytest.raises(ValueError) as exc:
         clean(self.test_image, 250, 3, -1)
     assert exc.value.message == "Kernel size value must be greater than 0."
예제 #7
0
 def test_sp_negative_window(self):
     with pytest.raises(ValueError) as exc:
         clean(self.test_image, 250, -1, 3)
     assert exc.value.message == "Window size value must be greater than 0."
예제 #8
0
 def test_sp_good(self):
     results = clean(self.test_image, 250, 3, 3)
     assert isinstance(results, list) and results is not None