Пример #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