"""Test cases for Quotes.""" from .. import util class TestQuotes(util.MdCase): """Test cases for repo link shortening.""" extension = [ 'pymdownx.superfences', 'pymdownx.quotes', ] extension_configs = { 'pymdownx.quotes': { 'callouts': True } } def test_separate_quotes(self): """Test separate quotes.""" self.check_markdown( """ > This is a paragraph > This is another paragraph. """, """

This is a paragraph

This is another paragraph.

""", True ) def test_together_quotes(self): """Test quotes together.""" self.check_markdown( """ > This is a paragraph > > This is another paragraph. """, """

This is a paragraph

This is another paragraph.

""", True ) def test_callout(self): """Test callout.""" self.check_markdown( """ > [!note] > Here is a note """, """

Note

Here is a note

""", True ) def test_callout_case(self): """Test callout class case insensitive.""" self.check_markdown( """ > [!NOTE] > Here is a note """, """

Note

Here is a note

""", True ) def test_callout_title(self): """Test callout title.""" self.check_markdown( """ > [!tip] Here's a tip > Use a custom title! """, """

Here's a tip

Use a custom title!

""", True ) def test_callout_open(self): """Test callout open.""" self.check_markdown( """ > [!danger]+ Click to see more > I'm collapsible. """, """
Click to see more

I'm collapsible.

""", True ) def test_callout_closed(self): """Test callout closed.""" self.check_markdown( """ > [!danger]- Click to see more > I'm collapsible. """, """
Click to see more

I'm collapsible.

""", True ) def test_blank_start(self): """Test blank start.""" self.check_markdown( """ > > [!note] > This is a note > >> >> [!note] >> This is a note """, """

Note

This is a note

Note

This is a note

""", True ) def test_superfences(self): """Test Quotes with SuperFences.""" self.check_markdown( """ This will work. > ``` > Test > > Test > ``` This will not. > ``` > Test > Test > ``` """, """

This will work.

Test

            Test
            

This will not.

``` Test

Test ```

""", True ) def test_multi_class(self): """Test multiple classes.""" self.check_markdown( """ > [!note | inline | end] > This is a note """, """

Note

This is a note

""", True ) def test_multi_class_case(self): """Ensure first class is case insensitive.""" self.check_markdown( """ > [!NOTE | INLINE | END] > This is a note """, """

Note

This is a note

""", True ) def test_nested(self): """Test nested content.""" self.check_markdown( """ > [!note] > Content > > [!danger] > > Content > > > [!important] > > > Content > > Content > > > > Content > > > [!tip] """, """

Note

Content

Danger

Content

Important

Content Content

Content

Tip

""", True )