Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(9)

Unified Diff: Lib/test/test_minidom.py

Issue 10639: reindent.py converts newlines to platform default
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Lib/test/test_marshal.py ('k') | Lib/test/test_mmap.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Lib/test/test_minidom.py Tue Jul 26 09:37:46 2011 +0300
+++ b/Lib/test/test_minidom.py Mon Jul 25 09:47:18 2011 -0400
@@ -279,7 +279,6 @@
child.setAttribute("def", "ghi")
self.confirm(len(child.attributes) == 1)
- self.assertRaises(xml.dom.NotFoundErr, child.removeAttribute, "foo")
child.removeAttribute("def")
self.confirm(len(child.attributes) == 0)
dom.unlink()
@@ -291,8 +290,6 @@
child.setAttributeNS("http://www.w3.org", "xmlns:python",
"http://www.python.org")
child.setAttributeNS("http://www.python.org", "python:abcattr", "foo")
- self.assertRaises(xml.dom.NotFoundErr, child.removeAttributeNS,
- "foo", "http://www.python.org")
self.confirm(len(child.attributes) == 2)
child.removeAttributeNS("http://www.python.org", "abcattr")
self.confirm(len(child.attributes) == 1)
@@ -304,23 +301,11 @@
child.setAttribute("spam", "jam")
self.confirm(len(child.attributes) == 1)
node = child.getAttributeNode("spam")
- self.assertRaises(xml.dom.NotFoundErr, child.removeAttributeNode,
- None)
child.removeAttributeNode(node)
self.confirm(len(child.attributes) == 0
and child.getAttributeNode("spam") is None)
- dom2 = Document()
- child2 = dom2.appendChild(dom.createElement("foo"))
- self.assertRaises(xml.dom.NotFoundErr, child.removeAttributeNode,
- node)
dom.unlink()
- def testHasAttribute(self):
- dom = Document()
- child = dom.appendChild(dom.createElement("foo"))
- child.setAttribute("spam", "jam")
- self.confirm(child.hasAttribute("spam"))
-
def testChangeAttr(self):
dom = parseString("<abc/>")
el = dom.documentElement
@@ -368,16 +353,7 @@
def testGetAttribute(self): pass
- def testGetAttributeNS(self):
- dom = Document()
- child = dom.appendChild(
- dom.createElementNS("http://www.python.org", "python:abc"))
- child.setAttributeNS("http://www.w3.org", "xmlns:python",
- "http://www.python.org")
- self.assertEqual(child.getAttributeNS("http://www.w3.org", "python"),
- 'http://www.python.org')
- self.assertEqual(child.getAttributeNS("http://www.w3.org", "other"),
- '')
+ def testGetAttributeNS(self): pass
def testGetAttributeNode(self): pass
@@ -561,13 +537,7 @@
def testFirstChild(self): pass
- def testHasChildNodes(self):
- dom = parseString("<doc><foo/></doc>")
- doc = dom.documentElement
- self.assertTrue(dom.hasChildNodes())
- dom2 = parseString("<doc/>")
- doc2 = dom2.documentElement
- self.assertFalse(doc2.hasChildNodes())
+ def testHasChildNodes(self): pass
def _testCloneElementCopiesAttributes(self, e1, e2, test):
attrs1 = e1.attributes
@@ -1469,14 +1439,6 @@
doc2 = parseString(doc.toxml())
self.confirm(doc2.namespaceURI == xml.dom.EMPTY_NAMESPACE)
- def testDocRemoveChild(self):
- doc = parse(tstfile)
- title_tag = doc.documentElement.getElementsByTagName("TITLE")[0]
- self.assertRaises( xml.dom.NotFoundErr, doc.removeChild, title_tag)
- num_children_before = len(doc.childNodes)
- doc.removeChild(doc.childNodes[0])
- num_children_after = len(doc.childNodes)
- self.assertTrue(num_children_after == num_children_before - 1)
def test_main():
run_unittest(MinidomTest)
« no previous file with comments | « Lib/test/test_marshal.py ('k') | Lib/test/test_mmap.py » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+