• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1"""
2Python Markdown
3
4A Python implementation of John Gruber's Markdown.
5
6Documentation: https://python-markdown.github.io/
7GitHub: https://github.com/Python-Markdown/markdown/
8PyPI: https://pypi.org/project/Markdown/
9
10Started by Manfred Stienstra (http://www.dwerg.net/).
11Maintained for a few years by Yuri Takhteyev (http://www.freewisdom.org).
12Currently maintained by Waylan Limberg (https://github.com/waylan),
13Dmitry Shachnev (https://github.com/mitya57) and Isaac Muse (https://github.com/facelessuser).
14
15Copyright 2007-2020 The Python Markdown Project (v. 1.7 and later)
16Copyright 2004, 2005, 2006 Yuri Takhteyev (v. 0.2-1.6b)
17Copyright 2004 Manfred Stienstra (the original version)
18
19License: BSD (see LICENSE.md for details).
20"""
21
22from markdown.test_tools import TestCase, recursionlimit
23
24
25class TestBlockquoteBlocks(TestCase):
26
27    # TODO: Move legacy tests here
28
29    def test_nesting_limit(self):
30        # Test that the nesting limit is within 100 levels of recursion limit. Future code changes could cause the
31        # recursion limit to need adjusted here. We need to account for all of Markdown's internal calls. Finally, we
32        # need to account for the 100 level cushion which we are testing.
33        with recursionlimit(120):
34            self.assertMarkdownRenders(
35                '>>>>>>>>>>',
36                self.dedent(
37                    """
38                    <blockquote>
39                    <blockquote>
40                    <blockquote>
41                    <blockquote>
42                    <blockquote>
43                    <p>&gt;&gt;&gt;&gt;&gt;</p>
44                    </blockquote>
45                    </blockquote>
46                    </blockquote>
47                    </blockquote>
48                    </blockquote>
49                    """
50                )
51            )
52