Exemplo n.º 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 ''."
Exemplo n.º 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."
Exemplo n.º 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."
Exemplo n.º 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."
Exemplo n.º 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."
Exemplo n.º 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."
Exemplo n.º 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."
Exemplo n.º 8
0
 def test_sp_good(self):
     results = clean(self.test_image, 250, 3, 3)
     assert isinstance(results, list) and results is not None