|
1 | 1 | # test for xml.dom.minidom |
2 | 2 |
|
3 | 3 | import pickle |
4 | | -from test.support import verbose, run_unittest, findfile |
| 4 | +from test.support import run_unittest, findfile |
5 | 5 | import unittest |
6 | 6 |
|
7 | 7 | import xml.dom.minidom |
@@ -310,9 +310,10 @@ def testRemoveAttributeNode(self): |
310 | 310 | self.confirm(len(child.attributes) == 0 |
311 | 311 | and child.getAttributeNode("spam") is None) |
312 | 312 | dom2 = Document() |
313 | | - child2 = dom2.appendChild(dom.createElement("foo")) |
314 | | - self.assertRaises(xml.dom.NotFoundErr, child.removeAttributeNode, |
315 | | - node) |
| 313 | + child2 = dom2.appendChild(dom2.createElement("foo")) |
| 314 | + node2 = child2.getAttributeNode("spam") |
| 315 | + self.assertRaises(xml.dom.NotFoundErr, child2.removeAttributeNode, |
| 316 | + node2) |
316 | 317 | dom.unlink() |
317 | 318 |
|
318 | 319 | def testHasAttribute(self): |
@@ -607,7 +608,7 @@ def testFirstChild(self): pass |
607 | 608 | def testHasChildNodes(self): |
608 | 609 | dom = parseString("<doc><foo/></doc>") |
609 | 610 | doc = dom.documentElement |
610 | | - self.assertTrue(dom.hasChildNodes()) |
| 611 | + self.assertTrue(doc.hasChildNodes()) |
611 | 612 | dom2 = parseString("<doc/>") |
612 | 613 | doc2 = dom2.documentElement |
613 | 614 | self.assertFalse(doc2.hasChildNodes()) |
|
0 commit comments