mirror of
https://github.com/python/cpython.git
synced 2025-12-15 21:44:50 +00:00
#9424: Replace deprecated assert* methods in the Python test suite.
This commit is contained in:
parent
b8bc439b20
commit
b3aedd4862
170 changed files with 2388 additions and 2392 deletions
|
|
@ -755,7 +755,7 @@ class MinidomTest(unittest.TestCase):
|
|||
def check_clone_pi(self, deep, testName):
|
||||
doc = parseString("<?target data?><doc/>")
|
||||
pi = doc.firstChild
|
||||
self.assertEquals(pi.nodeType, Node.PROCESSING_INSTRUCTION_NODE)
|
||||
self.assertEqual(pi.nodeType, Node.PROCESSING_INSTRUCTION_NODE)
|
||||
clone = pi.cloneNode(deep)
|
||||
self.confirm(clone.target == pi.target
|
||||
and clone.data == pi.data)
|
||||
|
|
@ -955,7 +955,7 @@ class MinidomTest(unittest.TestCase):
|
|||
def testBug0777884(self):
|
||||
doc = parseString("<o>text</o>")
|
||||
text = doc.documentElement.childNodes[0]
|
||||
self.assertEquals(text.nodeType, Node.TEXT_NODE)
|
||||
self.assertEqual(text.nodeType, Node.TEXT_NODE)
|
||||
# Should run quietly, doing nothing.
|
||||
text.normalize()
|
||||
doc.unlink()
|
||||
|
|
@ -1233,7 +1233,7 @@ class MinidomTest(unittest.TestCase):
|
|||
doc = parseString("<doc>a</doc>")
|
||||
elem = doc.documentElement
|
||||
text = elem.childNodes[0]
|
||||
self.assertEquals(text.nodeType, Node.TEXT_NODE)
|
||||
self.assertEqual(text.nodeType, Node.TEXT_NODE)
|
||||
|
||||
self.checkWholeText(text, "a")
|
||||
elem.appendChild(doc.createTextNode("b"))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue