示例#1
0
 def test_remove_doc_string(self):
     doc = ReSTDocument()
     doc.writeln('foo')
     doc.include_doc_string('<p>this is a <code>test</code></p>')
     doc.remove_last_doc_string()
     self.assertEqual(doc.getvalue(), b'foo\n')
示例#2
0
 def test_include_doc_string(self):
     doc = ReSTDocument()
     doc.include_doc_string('<p>this is a <code>test</code></p>')
     self.assertEqual(doc.getvalue(), b'\n\nthis is a ``test`` \n\n')