Exemplo n.º 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())
Exemplo n.º 2
0
 def inner_assertion_function():
     stack = inspect.stack()
     return ImageComparison(stack, ax=MagicMock())
Exemplo n.º 3
0
 def inner_assertion_function(ax):
     stack = inspect.stack()
     return ImageComparison(stack, ax=ax)
Exemplo n.º 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())