Пример #1
0
 def test_one_exclusion(self):
     assert (imageComparison.compare_images(reference, actual, result,
                                            [[235, 180, 725, 535]])
             is not True)
Пример #2
0
 def test_string_exclusions(self):
     with pytest.raises(TypeError):
         imageComparison.compare_images(reference, actual, result, "string")
Пример #3
0
 def test_two_exclusions(self):
     assert imageComparison.compare_images(
         reference, actual, result,
         [[45, 45, 245, 100], [485, 585, 940, 665]])
Пример #4
0
 def test_empty_exclusions(self):
     assert imageComparison.compare_images(reference, actual, result,
                                           "") is not True
Пример #5
0
 def test_empty_result(self):
     with pytest.raises(ValueError):
         imageComparison.compare_images(reference, actual, "", exclusions)
Пример #6
0
 def test_empty_actual(self):
     with pytest.raises(AttributeError):
         imageComparison.compare_images(reference, "", result, exclusions)
Пример #7
0
 def test_no_parameters(self):
     with pytest.raises(TypeError):
         imageComparison.compare_images()
Пример #8
0
 def test_same(self):
     assert imageComparison.compare_images(reference, reference, result,
                                           exclusions)