summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2013-08-10 15:30:29 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2013-08-10 15:30:29 (GMT)
commit0f12be15c635ea94cffde8d023a9183f15a8debd (patch)
treeaa7152b3767dca83ec37337a5366c9a3e2072152 /Lib/test
parent1d237e53564fea460c1c78c978d0b114b6458dd8 (diff)
downloadcpython-0f12be15c635ea94cffde8d023a9183f15a8debd.zip
cpython-0f12be15c635ea94cffde8d023a9183f15a8debd.tar.gz
cpython-0f12be15c635ea94cffde8d023a9183f15a8debd.tar.bz2
#18465: fix unused variables in test_minidom. Patch by Vajrasky Kok.
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_minidom.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/Lib/test/test_minidom.py b/Lib/test/test_minidom.py
index 5867b2d..a1516c2 100644
--- a/Lib/test/test_minidom.py
+++ b/Lib/test/test_minidom.py
@@ -1,7 +1,7 @@
# test for xml.dom.minidom
import pickle
-from test.support import verbose, run_unittest, findfile
+from test.support import run_unittest, findfile
import unittest
import xml.dom.minidom
@@ -310,9 +310,10 @@ class MinidomTest(unittest.TestCase):
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)
+ child2 = dom2.appendChild(dom2.createElement("foo"))
+ node2 = child2.getAttributeNode("spam")
+ self.assertRaises(xml.dom.NotFoundErr, child2.removeAttributeNode,
+ node2)
dom.unlink()
def testHasAttribute(self):
@@ -607,7 +608,7 @@ class MinidomTest(unittest.TestCase):
def testHasChildNodes(self):
dom = parseString("<doc><foo/></doc>")
doc = dom.documentElement
- self.assertTrue(dom.hasChildNodes())
+ self.assertTrue(doc.hasChildNodes())
dom2 = parseString("<doc/>")
doc2 = dom2.documentElement
self.assertFalse(doc2.hasChildNodes())