def test_inline_inline_tooltip(self): tooltip = 'mytooltip' expected_image = '![{}]({} \'{}\')'.format(self.text, self.path, tooltip) actual_image = Image.new_inline_image(text=self.text, path=self.path, tooltip=tooltip) self.assertEqual(expected_image, actual_image)
def new_inline_image(text, path): """Add inline images in a markdown file. For example ``[MyImage](../MyImage.jpg)``. :param text: Text that is going to be displayed in the markdown file as a iamge. :type text: str :param path: Image's path / link. :type path: str :return: return the image in markdown format ``'![ + text + '](' + path + ')'``. :rtype: str """ return Image.new_inline_image(text=text, path=path)
def test_new_inline_image(self): expected_image = '![{}]({})'.format(self.text, self.path) actual_image = Image.new_inline_image(text=self.text, path=self.path) self.assertEqual(expected_image, actual_image)