示例#1
0
 def test_deep_tags_paragraphs(self):
     aSection = Section('aTitle', 1)
     aParagraph = aSection.add_paragraph('This is some random text')
     self.assertIn('text', aParagraph)
     self.assertIn('tags', aParagraph)
     self.assertIn('citations', aParagraph)
     aParagraph['tags'].add('atag')
     self.assertIn('atag', aParagraph['tags'])
     self.assertTrue(aSection.has_tag('aTag'))
     self.assertFalse(aSection.has_tag('bloo'))
示例#2
0
 def test_tags(self):
     aSection = Section('aTitle', 1)
     aSection.add_tag('blah').add_tag('bloo')
     self.assertTrue(aSection.has_tag('blah'))
     self.assertTrue(aSection.has_tag('bloo'))
     self.assertFalse(aSection.has_tag('blee'))
示例#3
0
 def test_deep_tags_sections(self):
     aSection = Section('aTitle', 1)
     aSubSection = aSection.add_subsection('subsection', 2)
     aSubSection.add_tag('blah')
     self.assertTrue(aSection.has_tag('blah'))