(self)
| 1547 | |
| 1548 | @unittest.expectedFailure # TODO: RUSTPYTHON |
| 1549 | def testSchemaType(self): |
| 1550 | doc = parseString( |
| 1551 | "<!DOCTYPE doc [\n" |
| 1552 | " <!ENTITY e1 SYSTEM 'http://xml.python.org/e1'>\n" |
| 1553 | " <!ENTITY e2 SYSTEM 'http://xml.python.org/e2'>\n" |
| 1554 | " <!ATTLIST doc id ID #IMPLIED \n" |
| 1555 | " ref IDREF #IMPLIED \n" |
| 1556 | " refs IDREFS #IMPLIED \n" |
| 1557 | " enum (a|b) #IMPLIED \n" |
| 1558 | " ent ENTITY #IMPLIED \n" |
| 1559 | " ents ENTITIES #IMPLIED \n" |
| 1560 | " nm NMTOKEN #IMPLIED \n" |
| 1561 | " nms NMTOKENS #IMPLIED \n" |
| 1562 | " text CDATA #IMPLIED \n" |
| 1563 | " >\n" |
| 1564 | "]><doc id='name' notid='name' text='splat!' enum='b'" |
| 1565 | " ref='name' refs='name name' ent='e1' ents='e1 e2'" |
| 1566 | " nm='123' nms='123 abc' />") |
| 1567 | elem = doc.documentElement |
| 1568 | # We don't want to rely on any specific loader at this point, so |
| 1569 | # just make sure we can get to all the names, and that the |
| 1570 | # DTD-based namespace is right. The names can vary by loader |
| 1571 | # since each supports a different level of DTD information. |
| 1572 | t = elem.schemaType |
| 1573 | self.confirm(t.name is None |
| 1574 | and t.namespace == xml.dom.EMPTY_NAMESPACE) |
| 1575 | names = "id notid text enum ref refs ent ents nm nms".split() |
| 1576 | for name in names: |
| 1577 | a = elem.getAttributeNode(name) |
| 1578 | t = a.schemaType |
| 1579 | self.confirm(hasattr(t, "name") |
| 1580 | and t.namespace == xml.dom.EMPTY_NAMESPACE) |
| 1581 | |
| 1582 | @unittest.expectedFailure # TODO: RUSTPYTHON |
| 1583 | def testSetIdAttribute(self): |
nothing calls this directly
no test coverage detected