(self)
| 272 | |
| 273 | class TestSmarty(unittest.TestCase): |
| 274 | def setUp(self): |
| 275 | config = { |
| 276 | 'smarty': [ |
| 277 | ('smart_angled_quotes', True), |
| 278 | ('substitutions', { |
| 279 | 'ndash': '\u2013', |
| 280 | 'mdash': '\u2014', |
| 281 | 'ellipsis': '\u2026', |
| 282 | 'left-single-quote': '‚', # `sb` is not a typo! |
| 283 | 'right-single-quote': '‘', |
| 284 | 'left-double-quote': '„', |
| 285 | 'right-double-quote': '“', |
| 286 | 'left-angle-quote': '[', |
| 287 | 'right-angle-quote': ']', |
| 288 | }), |
| 289 | ] |
| 290 | } |
| 291 | self.md = markdown.Markdown( |
| 292 | extensions=['smarty'], |
| 293 | extension_configs=config |
| 294 | ) |
| 295 | |
| 296 | def testCustomSubstitutions(self): |
| 297 | text = """<< The "Unicode char of the year 2014" |
nothing calls this directly
no outgoing calls
no test coverage detected