コード例 #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)
コード例 #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)
コード例 #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)
コード例 #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)