예제 #1
0
파일: test_node.py 프로젝트: paddywwoof/vgc
 def testAppendChildDocument(self):
     doc1 = Document()
     n1 = Element(doc1, "foo")
     doc2 = Document()
     self.assertFalse(doc1.canAppendChild(doc2))
     self.assertFalse(n1.canAppendChild(doc1))
     self.assertFalse(n1.canAppendChild(doc2))
예제 #2
0
 def testAppendChildDocument(self):
     element = Element("foo")
     document = Document()
     self.assertFalse(element.canAppendChild(document))
     self.assertIsNone(element.appendChild(document))
예제 #3
0
 def testAppendChild(self):
     node1 = Element("foo")
     node2 = Element("bar")
     self.assertTrue(node1.canAppendChild(node2))
     self.assertEqual(node1.appendChild(node2), node2)