Exemplo n.º 1
0
 def test_render_rst_with_child(self):
     node = Note(indent=5)
     child = Node(indent=10, lines=["Description"], parent=node)
     node.add_child(child)
     rst = node.render_rst()
     self.assertEqual(
         rst, ['     .. note::', '     ', '          Description', ''])
Exemplo n.º 2
0
 def test_render_rst_with_child(self):
     node = Note(indent=5)
     child = Node(indent=10, lines=["Description"], parent=node)
     node.add_child(child)
     rst = node.render_rst()
     self.assertEqual(rst, ['     .. note::',
                            '     ',
                            '          Description',
                            ''])
Exemplo n.º 3
0
 def test_render_rst_with_children(self):
     node = Note(indent=5)
     child_a = Node(indent=10, lines=["ChildA"], parent=node)
     node.add_child(child_a)
     child_b = Node(indent=12, lines=["ChildB"], parent=node)
     node.add_child(child_b)
     rst = node.render_rst()
     self.assertEqual(rst, [
         '     .. note::', '     ', '          ChildA',
         '            ChildB', ''
     ])
Exemplo n.º 4
0
 def test_render_rst_with_children(self):
     node = Note(indent=5)
     child_a = Node(indent=10, lines=["ChildA"], parent=node)
     node.add_child(child_a)
     child_b = Node(indent=12, lines=["ChildB"], parent=node)
     node.add_child(child_b)
     rst = node.render_rst()
     self.assertEqual(rst, ['     .. note::',
                            '     ',
                            '          ChildA',
                            '            ChildB',
                            ''])
Exemplo n.º 5
0
 def test_render_rst_indent(self):
     node = Note(indent=5)
     rst = node.render_rst()
     self.assertEqual(rst, ['     .. note::', '     '])
Exemplo n.º 6
0
 def test_render_rst_indent(self):
     node = Note(indent=5)
     rst = node.render_rst()
     self.assertEqual(rst, ['     .. note::',
                            '     '])