def test_no_spaces_before_punctuation(self): self.node.children.append(CharNode(None, "text , other .")) self.assertEquals("text, other.\n\n", self.node.to_rst())
def setUp(self): self.node = LinkNode(None, "link", {"xlink:href": "href"}) self.text = CharNode(None, "text") self.node.children.append(self.text)
def test_collapse_spaces(self): self.node.children.append(CharNode(None, "text with spaces")) self.assertEquals("text with spaces\n\n", self.node.to_rst())
def test_to_rst(self): self.node.children.append(CharNode(None, "text")) self.assertEquals("text\n\n", self.node.to_rst())
def char_data(self, data): if data.strip() != "": node = CharNode(self.current, data) self.current.children.append(node)
def setUp(self): self.node = CharNode(None, "foo")
def setUp(self): self.attributes = {"name": "test_name", "type": "test_type"} self.node = ParameterNode(None, "parameter", self.attributes) self.node.children.append(CharNode(None, "test_data"))