예제 #1
0
 def test_image_comparison_not_in_assertion(self):
     """
     Assert raises when image comparison not in assertion helper
     """
     with pytest.raises(ValueError, match="not a test function"):
         stack = inspect.stack()
         ImageComparison(stack, ax=MagicMock())
예제 #2
0
 def inner_assertion_function():
     stack = inspect.stack()
     return ImageComparison(stack, ax=MagicMock())
예제 #3
0
 def inner_assertion_function(ax):
     stack = inspect.stack()
     return ImageComparison(stack, ax=ax)
예제 #4
0
 def test_image_comparison_requires_ax(self):
     """
     Assert raises if an axes object is not supplied
     """
     with pytest.raises(ValueError, match="ax must be specified"):
         ImageComparison(inspect.stack())