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())
def inner_assertion_function(): stack = inspect.stack() return ImageComparison(stack, ax=MagicMock())
def inner_assertion_function(ax): stack = inspect.stack() return ImageComparison(stack, ax=ax)
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())