def test_rst_quote_makes_quote_slide(self): document = make_document( 'quoted', """\ .. slide:: Quotes :level: 2 reStructuredText quotes are automatically converted -- The Sign Painter """, ) translator = SlideTranslator( self.builder, document, ) document.walkabout(translator) self.assertEqual( translator.body, [ u'\n<article class="admonition-quotes slide level-2">\n\n' '<h2>Quotes</h2>\n\n' '<q>\n' 'reStructuredText quotes are automatically converted</q>\n' '<div class="author">\n' 'The Sign Painter</div>' '\n\n\n\n\n</article>', ], )
def test_slide_titles(self): document = make_document( 'testing', """\ .. slide:: Slide Title Slide Content """, ) translator = SlideTranslator( self.builder, document, ) document.walkabout(translator) self.assertEqual( translator.body, [ u'\n<article class="admonition-slide-title slide level-1">\n\n' '<h1>Slide Title</h1>\n\n' '<p>Slide Content</p>\n\n\n\n\n</article>', ], )
def test_rst_quote_processes_normally_with_extra_content(self): document = util.make_document( 'quoted', """\ .. slide:: Indented RST :level: 2 This text is over indented. As is this text. They look like quotes but they're not. """, ) translator = SlideTranslator( self.builder, document, ) document.walkabout(translator) self.assertEqual( translator.body, [ u'\n<article class="admonition-indented-rst slide level-2">\n\n' '<h2>Indented RST</h2>\n\n' '<blockquote>\n' '<div><p>This text is over indented.</p>\n' '<p>As is this text.</p>\n' '<p>They look like quotes but they\'re not.</p>\n' '</div></blockquote>\n' '\n\n\n\n</article>', ], )
def test_non_section_titles_rendered_normally(self): document = make_document( 'testing', """\ Section Title ------------- Some Text .. note:: Take note! Another paragraph """, ) translator = SlideTranslator( self.builder, document, ) document.walkabout(translator) self.assertEqual( translator.body, [ u'\n<article class="slide level-1" id="section-title">\n\n' '<h1>Section Title</h1>\n\n' '<p>Some Text</p>\n' '<div class="admonition note">\n' '<p class="first admonition-title">Note</p>\n' '<p class="last">Take note!</p>\n' '</div>\n' '<p>Another paragraph</p>' '\n\n\n\n\n</article>', ], )