(self)
| 1090 | |
| 1091 | @unittest.expectedFailure # TODO: RUSTPYTHON |
| 1092 | def test_namespace(self): |
| 1093 | # Test namespace issues. |
| 1094 | |
| 1095 | # 1) xml namespace |
| 1096 | |
| 1097 | elem = ET.XML("<tag xml:lang='en' />") |
| 1098 | self.serialize_check(elem, '<tag xml:lang="en" />') # 1.1 |
| 1099 | |
| 1100 | # 2) other "well-known" namespaces |
| 1101 | |
| 1102 | elem = ET.XML("<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' />") |
| 1103 | self.serialize_check(elem, |
| 1104 | '<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" />') # 2.1 |
| 1105 | |
| 1106 | elem = ET.XML("<html:html xmlns:html='http://www.w3.org/1999/xhtml' />") |
| 1107 | self.serialize_check(elem, |
| 1108 | '<html:html xmlns:html="http://www.w3.org/1999/xhtml" />') # 2.2 |
| 1109 | |
| 1110 | elem = ET.XML("<soap:Envelope xmlns:soap='http://schemas.xmlsoap.org/soap/envelope' />") |
| 1111 | self.serialize_check(elem, |
| 1112 | '<ns0:Envelope xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope" />') # 2.3 |
| 1113 | |
| 1114 | # 3) unknown namespaces |
| 1115 | elem = ET.XML(SAMPLE_XML_NS) |
| 1116 | self.serialize_check(elem, |
| 1117 | '<ns0:body xmlns:ns0="http://effbot.org/ns">\n' |
| 1118 | ' <ns0:tag>text</ns0:tag>\n' |
| 1119 | ' <ns0:tag />\n' |
| 1120 | ' <ns0:section>\n' |
| 1121 | ' <ns0:tag>subtext</ns0:tag>\n' |
| 1122 | ' </ns0:section>\n' |
| 1123 | '</ns0:body>') |
| 1124 | |
| 1125 | def test_qname(self): |
| 1126 | # Test QName handling. |
nothing calls this directly
no test coverage detected