예제 #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)