mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 18:59:04 +08:00
Mark failing tests on test_minidom.py
This commit is contained in:
1 parent
c6b6a722fa
commit
87abdbd204
1 file changed
+25
Vendored
+25
@@ -482,6 +482,7 @@ class MinidomTest(unittest.TestCase):
|
||||
|
||||
def testGetAttributeNode(self): pass
|
||||
|
||||
@unittest.expectedFailure # TODO: RUSTPYTHON
|
||||
def testGetElementsByTagNameNS(self):
|
||||
d="""<foo xmlns:minidom='http://pyxml.sf.net/minidom'>
|
||||
<minidom:myelem/>
|
||||
@@ -552,6 +553,7 @@ class MinidomTest(unittest.TestCase):
|
||||
self.assertEqual(str(node), repr(node))
|
||||
dom.unlink()
|
||||
|
||||
@unittest.expectedFailure # TODO: RUSTPYTHON
|
||||
def testWriteXML(self):
|
||||
str = '<?xml version="1.0" ?><a b="c"/>'
|
||||
dom = parseString(str)
|
||||
@@ -599,6 +601,7 @@ class MinidomTest(unittest.TestCase):
|
||||
'lflf=" " '
|
||||
'ws="	 "/>')
|
||||
|
||||
@unittest.expectedFailure # TODO: RUSTPYTHON
|
||||
def testAltNewline(self):
|
||||
str = '<?xml version="1.0" ?>\n<a b="c"/>\n'
|
||||
dom = parseString(str)
|
||||
@@ -640,6 +643,7 @@ class MinidomTest(unittest.TestCase):
|
||||
dom.getElementsByTagName('B')[0].childNodes[0].toxml(),
|
||||
dom2.getElementsByTagName('B')[0].childNodes[0].toxml())
|
||||
|
||||
@unittest.expectedFailure # TODO: RUSTPYTHON
|
||||
def testProcessingInstruction(self):
|
||||
dom = parseString('<e><?mypi \t\n data \t\n ?></e>')
|
||||
pi = dom.documentElement.firstChild
|
||||
@@ -655,6 +659,7 @@ class MinidomTest(unittest.TestCase):
|
||||
self.assertIsNone(pi.localName)
|
||||
self.assertEqual(pi.namespaceURI, xml.dom.EMPTY_NAMESPACE)
|
||||
|
||||
@unittest.expectedFailure # TODO: RUSTPYTHON
|
||||
def testProcessingInstructionRepr(self):
|
||||
dom = parseString('<e><?mypi \t\n data \t\n ?></e>')
|
||||
pi = dom.documentElement.firstChild
|
||||
@@ -701,6 +706,7 @@ class MinidomTest(unittest.TestCase):
|
||||
|
||||
def testAttrListKeysNS(self): pass
|
||||
|
||||
@unittest.expectedFailure # TODO: RUSTPYTHON
|
||||
def testRemoveNamedItem(self):
|
||||
doc = parseString("<doc a=''/>")
|
||||
e = doc.documentElement
|
||||
@@ -710,6 +716,7 @@ class MinidomTest(unittest.TestCase):
|
||||
self.assertTrue(a1.isSameNode(a2))
|
||||
self.assertRaises(xml.dom.NotFoundErr, attrs.removeNamedItem, "a")
|
||||
|
||||
@unittest.expectedFailure # TODO: RUSTPYTHON
|
||||
def testRemoveNamedItemNS(self):
|
||||
doc = parseString("<doc xmlns:a='http://xml.python.org/' a:b=''/>")
|
||||
e = doc.documentElement
|
||||
@@ -782,6 +789,7 @@ class MinidomTest(unittest.TestCase):
|
||||
root.setAttribute("added", "VALUE")
|
||||
return dom, clone
|
||||
|
||||
@unittest.expectedFailure # TODO: RUSTPYTHON
|
||||
def testCloneElementShallow(self):
|
||||
dom, clone = self._setupCloneElement(0)
|
||||
self.assertEqual(len(clone.childNodes), 0)
|
||||
@@ -933,9 +941,11 @@ class MinidomTest(unittest.TestCase):
|
||||
self.confirm(clone.specified,
|
||||
testName + ": cloned attribute must have specified == True")
|
||||
|
||||
@unittest.expectedFailure # TODO: RUSTPYTHON
|
||||
def testCloneAttributeShallow(self):
|
||||
self.check_clone_attribute(0, "testCloneAttributeShallow")
|
||||
|
||||
@unittest.expectedFailure # TODO: RUSTPYTHON
|
||||
def testCloneAttributeDeep(self):
|
||||
self.check_clone_attribute(1, "testCloneAttributeDeep")
|
||||
|
||||
@@ -947,9 +957,11 @@ class MinidomTest(unittest.TestCase):
|
||||
self.confirm(clone.target == pi.target
|
||||
and clone.data == pi.data)
|
||||
|
||||
@unittest.expectedFailure # TODO: RUSTPYTHON
|
||||
def testClonePIShallow(self):
|
||||
self.check_clone_pi(0, "testClonePIShallow")
|
||||
|
||||
@unittest.expectedFailure # TODO: RUSTPYTHON
|
||||
def testClonePIDeep(self):
|
||||
self.check_clone_pi(1, "testClonePIDeep")
|
||||
|
||||
@@ -1000,6 +1012,7 @@ class MinidomTest(unittest.TestCase):
|
||||
self.assertIs(handler.src, entity)
|
||||
self.assertIs(handler.dst, dst)
|
||||
|
||||
@unittest.expectedFailure # TODO: RUSTPYTHON
|
||||
def testCloneNodeEntity(self):
|
||||
self.check_clone_node_entity(False)
|
||||
self.check_clone_node_entity(True)
|
||||
@@ -1206,6 +1219,7 @@ class MinidomTest(unittest.TestCase):
|
||||
self.assertIsNone(node.childNodes[-1].nextSibling,
|
||||
"Final child's .nextSibling should be None")
|
||||
|
||||
@unittest.expectedFailure # TODO: RUSTPYTHON
|
||||
def testSiblings(self):
|
||||
doc = parseString("<doc><?pi?>text?<elm/></doc>")
|
||||
root = doc.documentElement
|
||||
@@ -1247,6 +1261,7 @@ class MinidomTest(unittest.TestCase):
|
||||
"test NodeList.item()")
|
||||
doc.unlink()
|
||||
|
||||
@unittest.expectedFailure # TODO: RUSTPYTHON
|
||||
def testEncodings(self):
|
||||
doc = parseString('<foo>€</foo>')
|
||||
self.assertEqual(doc.toxml(),
|
||||
@@ -1325,6 +1340,7 @@ class MinidomTest(unittest.TestCase):
|
||||
self.assertRaises(xml.dom.WrongDocumentErr, doc2.renameNode, node,
|
||||
xml.dom.EMPTY_NAMESPACE, "foo")
|
||||
|
||||
@unittest.expectedFailure # TODO: RUSTPYTHON
|
||||
def testRenameAttribute(self):
|
||||
doc = parseString("<doc a='v'/>")
|
||||
elem = doc.documentElement
|
||||
@@ -1529,6 +1545,7 @@ class MinidomTest(unittest.TestCase):
|
||||
self.confirm(text is None
|
||||
and len(elem.childNodes) == 2)
|
||||
|
||||
@unittest.expectedFailure # TODO: RUSTPYTHON
|
||||
def testSchemaType(self):
|
||||
doc = parseString(
|
||||
"<!DOCTYPE doc [\n"
|
||||
@@ -1562,6 +1579,7 @@ class MinidomTest(unittest.TestCase):
|
||||
self.confirm(hasattr(t, "name")
|
||||
and t.namespace == xml.dom.EMPTY_NAMESPACE)
|
||||
|
||||
@unittest.expectedFailure # TODO: RUSTPYTHON
|
||||
def testSetIdAttribute(self):
|
||||
doc = parseString("<doc a1='v' a2='w'/>")
|
||||
e = doc.documentElement
|
||||
@@ -1593,6 +1611,7 @@ class MinidomTest(unittest.TestCase):
|
||||
self.confirm(e.isSameNode(doc.getElementById("w"))
|
||||
and a2.isId)
|
||||
|
||||
@unittest.expectedFailure # TODO: RUSTPYTHON
|
||||
def testSetIdAttributeNS(self):
|
||||
NS1 = "http://xml.python.org/ns1"
|
||||
NS2 = "http://xml.python.org/ns2"
|
||||
@@ -1629,6 +1648,7 @@ class MinidomTest(unittest.TestCase):
|
||||
self.confirm(e.isSameNode(doc.getElementById("w"))
|
||||
and a2.isId)
|
||||
|
||||
@unittest.expectedFailure # TODO: RUSTPYTHON
|
||||
def testSetIdAttributeNode(self):
|
||||
NS1 = "http://xml.python.org/ns1"
|
||||
NS2 = "http://xml.python.org/ns2"
|
||||
@@ -1726,6 +1746,7 @@ class MinidomTest(unittest.TestCase):
|
||||
doc2 = parseString(doc.toxml())
|
||||
self.assertEqual(doc2.namespaceURI, xml.dom.EMPTY_NAMESPACE)
|
||||
|
||||
@unittest.expectedFailure # TODO: RUSTPYTHON
|
||||
def testExceptionOnSpacesInXMLNSValue(self):
|
||||
with self.assertRaises((ValueError, ExpatError)):
|
||||
parseString(
|
||||
@@ -1749,6 +1770,7 @@ class MinidomTest(unittest.TestCase):
|
||||
pi = doc.createProcessingInstruction("y", "z")
|
||||
pi.nodeValue = "crash"
|
||||
|
||||
@unittest.expectedFailure # TODO: RUSTPYTHON
|
||||
def test_minidom_attribute_order(self):
|
||||
xml_str = '<?xml version="1.0" ?><curriculum status="public" company="example"/>'
|
||||
doc = parseString(xml_str)
|
||||
@@ -1756,11 +1778,13 @@ class MinidomTest(unittest.TestCase):
|
||||
doc.writexml(output)
|
||||
self.assertEqual(output.getvalue(), xml_str)
|
||||
|
||||
@unittest.expectedFailure # TODO: RUSTPYTHON
|
||||
def test_toxml_with_attributes_ordered(self):
|
||||
xml_str = '<?xml version="1.0" ?><curriculum status="public" company="example"/>'
|
||||
doc = parseString(xml_str)
|
||||
self.assertEqual(doc.toxml(), xml_str)
|
||||
|
||||
@unittest.expectedFailure # TODO: RUSTPYTHON
|
||||
def test_toprettyxml_with_attributes_ordered(self):
|
||||
xml_str = '<?xml version="1.0" ?><curriculum status="public" company="example"/>'
|
||||
doc = parseString(xml_str)
|
||||
@@ -1768,6 +1792,7 @@ class MinidomTest(unittest.TestCase):
|
||||
'<?xml version="1.0" ?>\n'
|
||||
'<curriculum status="public" company="example"/>\n')
|
||||
|
||||
@unittest.expectedFailure # TODO: RUSTPYTHON
|
||||
def test_toprettyxml_with_cdata(self):
|
||||
xml_str = '<?xml version="1.0" ?><root><node><![CDATA[</data>]]></node></root>'
|
||||
doc = parseString(xml_str)
|
||||
|
||||
Reference in new issue
Block a user