def test_docencoding(self): import pomtest doc = POM.POMDocument(dtd=pomtest) doc.set_encoding("iso-8859-1") self.assertEqual(doc.encoding, "iso-8859-1")
def test_6POMemit(self): import pomtest doc = POM.POMDocument(dtd=pomtest) doc.set_root(pomtest.Toplevel()) doc.root.idval = "someid" # satisfy #REQUIRED attribute doc.emit(sys.stdout)
def test_negdocencoding(self): import pomtest doc = POM.POMDocument(dtd=pomtest) self.assertRaises(ValueError, doc.set_encoding, "xxx")
def test_5POMvalidation(self): import pomtest # previous test just created this. doc = POM.POMDocument(dtd=pomtest) doc.set_root(pomtest.Toplevel()) self.assertRaises(POM.ValidationError, str, doc)