MCPcopy Index your code
hub / github.com/aws/aws-cli / test_flush_structure

Method test_flush_structure

tests/unit/bcdoc/test_document.py:138–149  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

136 self.assertEqual(section.name, section_name)
137
138 def test_flush_structure(self):
139 section = self.doc_structure.add_new_section('mysection')
140 subsection = section.add_new_section('mysubsection')
141 self.doc_structure.writeln('1')
142 section.writeln('2')
143 subsection.writeln('3')
144 second_section = self.doc_structure.add_new_section('mysection2')
145 second_section.writeln('4')
146 contents = self.doc_structure.flush_structure()
147
148 # Ensure the contents were flushed out correctly
149 self.assertEqual(contents, b'1\n2\n3\n4\n')
150
151 def test_flush_structure_hrefs(self):
152 section = self.doc_structure.add_new_section('mysection')

Callers

nothing calls this directly

Calls 3

add_new_sectionMethod · 0.45
writelnMethod · 0.45
flush_structureMethod · 0.45

Tested by

no test coverage detected