Beispiel #1
0
    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)
Beispiel #2
0
    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)
Beispiel #3
0
    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)