Exemplo n.º 1
0
    def setUp(self):
        self.content = """Hello,

    #!python
        def foo(self):
            return 'bar'

foo bar baz

    :::python
        def foo(self):
            return 'bar'
        """
        self.formatter = MarkdownFormatter(self.content)
Exemplo n.º 2
0
    def setUp(self):
        self.content = """Hello,

    #!python
        def foo(self):
            return 'bar'

foo bar baz

    :::python
        def foo(self):
            return 'bar'
        """
        self.formatter = MarkdownFormatter(self.content)
Exemplo n.º 3
0
class MarkdownTests(TestCase):
    def setUp(self):
        self.content = """Hello,

    #!python
        def foo(self):
            return 'bar'

foo bar baz

    :::python
        def foo(self):
            return 'bar'
        """
        self.formatter = MarkdownFormatter(self.content)

    def test_parses_code_blocks_properly(self):
        html = self.formatter.get_html()
        self.assertTrue(html.find("python") < 0)
Exemplo n.º 4
0
class MarkdownTests(TestCase):
    def setUp(self):
        self.content = """Hello,

    #!python
        def foo(self):
            return 'bar'

foo bar baz

    :::python
        def foo(self):
            return 'bar'
        """
        self.formatter = MarkdownFormatter(self.content)

    def test_parses_code_blocks_properly(self):
        html = self.formatter.get_html()
        self.assertTrue(html.find('python') < 0)