コード例 #1
0
 def test_getdocument(self):
     doc = LatexDocument()
     header = [LatexCommand("head"), LatexText("headtext")]
     content = [LatexCommand("content"), LatexText("contenttext")]
     doc.setHeader(header)
     doc.setContent(content)
     assert doc.getDocument() == r"""\head
コード例 #2
0
 def test_set_header(self):
     doc = LatexDocument()
     doc.setHeader([LatexCommand("test"), LatexText("text")])
     assert doc.getLinesHeader()[0].getString() == r"\test" and doc.getLinesHeader()[1].getString() == r"text"