예제 #1
0
 def testAddParagraph(self):
     entry = raw_doc.RawEntry(self.tok)
     self.assertEqual(entry.body, raw_doc.RawBody())
     p = raw_doc.RawParagraph(self.tok)
     entry.addParagraph(p)
     b = raw_doc.RawBody()
     b.addParagraph(p)
     self.assertEqual(entry.body, b)
예제 #2
0
 def testInitialization(self):
     entry = raw_doc.RawEntry(self.tok)
     self.assertEqual(entry.name.text, raw_doc.RawText().text)
     self.assertEqual(len(entry.briefs), 0)
     self.assertEqual(entry.body, raw_doc.RawBody())
     self.assertEqual(entry.sees, [])
     self.assertEqual(entry.command, '<entry>')
예제 #3
0
 def testGetFormatted(self):
     body = raw_doc.RawBody()
     body.addParagraph(self.p)
     self.assertEqual(body.getFormatted(self.formatter), 'aword\n')
예제 #4
0
 def testCreation(self):
     body = raw_doc.RawBody()
     self.assertEqual(body.paragraphs, [])
     body.addParagraph(self.p)
     self.assertEqual(body.paragraphs, [self.p])