# coding: utf-8 """ Unittest which failed, cause bugfixes not implemented, yet. """ import unittest from creole.html_tools.strip_html import strip_html from creole.tests.utils.base_unittest import BaseCreoleTest class StripHtml(unittest.TestCase): @unittest.expectedFailure def test_not_closed_image_tag(self): output = strip_html('

a image.

') self.assertEqual(output, '

a image.

') @unittest.expectedFailure def test_remove_linebreak(self): output = strip_html('foo\n') self.assertEqual(output, 'foo') class CrossCompareCreoleTests(BaseCreoleTest): @unittest.expectedFailure def test_cross_lines_creole2html(self): """ TODO: bold/italics cross lines in creole2html see: http://code.google.com/p/python-creole/issues/detail?id=13 Info: The way html2creole works, see above """ self.cross_compare_creole( creole_string=r""" Bold and italics should //be able// to **cross lines.** """, html_string="""

Bold and italics should be
able
to cross
lines.

""" ) @unittest.expectedFailure def test_cross_paragraphs(self): """ TODO: bold/italics cross paragraphs in creole2html see: http://code.google.com/p/python-creole/issues/detail?id=13 """ self.assert_creole2html(""" But, should //not be... ...able// to cross paragraphs. """, """

But, should not be...

...able to cross paragraphs.

""") @unittest.expectedFailure def test_escape_inline(self): """ TODO: different pre/code syntax? """ self.cross_compare_creole(r""" this is {{{**escaped** inline}}}, isn't it? {{{ a **code** block }}} """, """

this is **escaped** inline, isn't it?

            a **code**
            block
            
""") class TestHtml2CreoleMarkup(BaseCreoleTest): @unittest.expectedFailure def test_format_in_a_text(self): """ TODO: http://code.google.com/p/python-creole/issues/detail?id=4 """ self.assert_html2creole(r""" **[[/url/|title]]** """, """ title """) @unittest.expectedFailure def test_newline_before_headline(self): """ TODO: http://code.google.com/p/python-creole/issues/detail?id=16#c5 """ self.assert_html2creole(r""" **foo** = one """, """ foo

one

""") # , debug=True) @unittest.expectedFailure def test_no_space_before_blocktag(self): """ TODO: Bug in html2creole.strip_html(): Don't add a space before/after block tags """ self.assert_html2creole(r""" **foo** * one """, """ foo """ # , debug=True ) @unittest.expectedFailure def test_escape_char(self): self.assert_html2creole(r""" ~#1 http://domain.tld/~bar/ ~http://domain.tld/ [[Link]] ~[[Link]] """, """

#1
http://domain.tld/~bar/
http://domain.tld/
Link
[[Link]]

""") @unittest.expectedFailure def test_images(self): self.assert_html2creole(r""" a {{/image.jpg|JPG pictures}} and a {{/image.jpeg|JPEG pictures}} and a {{/image.gif|GIF pictures}} and a {{/image.png|PNG pictures}} ! picture [[www.domain.tld|{{foo.JPG|Foo}}]] as a link """, """

a JPG pictures and
a JPEG pictures and
a GIF pictures and
a PNG pictures !

picture Foo as a link

""" # , debug=True )