MCPcopy Create free account
hub / github.com/Python-Markdown/markdown / test_basic

Method test_basic

tests/test_syntax/extensions/test_smarty.py:30–86  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

28 default_kwargs = {'extensions': ['smarty']}
29
30 def test_basic(self):
31 self.assertMarkdownRenders(
32 "It's fun. What's fun?",
33 '<p>It&rsquo;s fun. What&rsquo;s fun?</p>'
34 )
35 self.assertMarkdownRenders(
36 '"Isn\'t this fun"? --- she said...&#x27;,
37 '<p>&ldquo;Isn&rsquo;t this fun&rdquo;? &mdash; she said&hellip;</p>'
38 )
39 self.assertMarkdownRenders(
40 '"\'Quoted\' words in a larger quote."',
41 '<p>&ldquo;&lsquo;Quoted&rsquo; words in a larger quote.&rdquo;</p>'
42 )
43 self.assertMarkdownRenders(
44 '\'Quoted "words" in a larger quote.\'',
45 '<p>&lsquo;Quoted &ldquo;words&rdquo; in a larger quote.&rsquo;</p>'
46 )
47 self.assertMarkdownRenders(
48 '"Quoted words at the \'end.\'"',
49 '<p>&ldquo;Quoted words at the &lsquo;end.&rsquo;&rdquo;</p>'
50 )
51 self.assertMarkdownRenders(
52 '\'Quoted words at the "end."\'',
53 '<p>&lsquo;Quoted words at the &ldquo;end.&rdquo;&rsquo;</p>'
54 )
55 self.assertMarkdownRenders(
56 '(He replied, "She said \'Hello.\'")',
57 '<p>(He replied, &ldquo;She said &lsquo;Hello.&rsquo;&rdquo;)</p>'
58 )
59 self.assertMarkdownRenders(
60 '<span>He replied, "She said \'Hello.\'"</span>',
61 '<p><span>He replied, &ldquo;She said &lsquo;Hello.&rsquo;&rdquo;</span></p>'
62 )
63 self.assertMarkdownRenders(
64 '"quoted" text and **bold "quoted" text**',
65 '<p>&ldquo;quoted&rdquo; text and <strong>bold &ldquo;quoted&rdquo; text</strong></p>'
66 )
67 self.assertMarkdownRenders(
68 "'quoted' text and **bold 'quoted' text**",
69 '<p>&lsquo;quoted&rsquo; text and <strong>bold &lsquo;quoted&rsquo; text</strong></p>'
70 )
71 self.assertMarkdownRenders(
72 'em-dashes (---) and ellipes (...)',
73 '<p>em-dashes (&mdash;) and ellipes (&hellip;)</p>'
74 )
75 self.assertMarkdownRenders(
76 '"[Link](http://example.com)" --- she said.',
77 '<p>&ldquo;<a href="http://example.com">Link</a>&rdquo; &mdash; she said.</p>'
78 )
79 self.assertMarkdownRenders(
80 '"Ellipsis within quotes..."',
81 '<p>&ldquo;Ellipsis within quotes&hellip;&rdquo;</p>'
82 )
83 self.assertMarkdownRenders(
84 "*Custer*'s Last Stand",
85 "<p><em>Custer</em>&rsquo;s Last Stand</p>"
86 )
87

Callers

nothing calls this directly

Calls 1

assertMarkdownRendersMethod · 0.80

Tested by

no test coverage detected