Skip to content

Commit 11fa3cf

Browse files
thomasjpfancmccandless
authored andcommitted
markdown: updates tests to v1.3.0 (exercism#1486)
1 parent fec57db commit 11fa3cf

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

exercises/markdown/markdown_test.py

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from markdown import parse_markdown
33

44

5-
# Tests adapted from `problem-specifications//canonical-data.json` @ v1.2.0
5+
# Tests adapted from `problem-specifications//canonical-data.json` @ v1.3.0
66

77
class MarkdownTest(unittest.TestCase):
88

@@ -45,6 +45,25 @@ def test_little_bit_of_everything(self):
4545
'<h1>Header!</h1><ul><li><strong>Bold Item</strong></li>'
4646
'<li><em>Italic Item</em></li></ul>')
4747

48+
def test_symbols_in_the_header_text_that_should_not_be_interpreted(self):
49+
self.assertEqual(
50+
parse_markdown('# This is a header with # and * in the text'),
51+
'<h1>This is a header with # and * in the text</h1>')
52+
53+
def test_symbols_in_the_list_item_text_that_should_not_be_interpreted(
54+
self):
55+
self.assertEqual(
56+
parse_markdown(
57+
'* Item 1 with a # in the text\n* Item 2 with * in the text'),
58+
'<ul><li>Item 1 with a # in the text</li>'
59+
'<li>Item 2 with * in the text</li></ul>')
60+
61+
def test_symbols_in_the_paragraph_text_that_should_not_be_interpreted(
62+
self):
63+
self.assertEqual(
64+
parse_markdown('This is a paragraph with # and * in the text'),
65+
'<p>This is a paragraph with # and * in the text</p>')
66+
4867

4968
if __name__ == '__main__':
5069
unittest.main()

0 commit comments

Comments
 (0)