def test_render_rst_with_child(self): node = Raises(5) child = Node(indent=10, lines=["Description"], parent=node) node.add_child(child) rst = node.render_rst() self.assertEqual(rst, [' :raises:', ' Description', ''])
def test_render_rst_with_children(self): node = Raises(5) child_a = Node(indent=10, lines=["ChildA"], parent=node) node.add_child(child_a) child_b = Node(indent=10, lines=["ChildB"], parent=node) node.add_child(child_b) rst = node.render_rst() self.assertEqual( rst, [' :raises:', ' ChildA', ' ChildB', ''])
def test_render_rst_with_children(self): node = Raises(5) child_a = Node(indent=10, lines=["ChildA"], parent=node) node.add_child(child_a) child_b = Node(indent=10, lines=["ChildB"], parent=node) node.add_child(child_b) rst = node.render_rst() self.assertEqual(rst, [' :raises:', ' ChildA', ' ChildB', ''])
def test_render_rst_indent(self): node = Raises(indent=5) rst = node.render_rst() self.assertEqual(rst, [' :raises:', ''])
def test_render_rst_empty(self): node = Raises() rst = node.render_rst() self.assertEqual(rst, [':raises:', ''])