MCPcopy Index your code
hub / github.com/python/cpython / checkRenameNodeSharedConstraints

Method checkRenameNodeSharedConstraints

Lib/test/test_minidom.py:1320–1326  ·  view source on GitHub ↗
(self, doc, node)

Source from the content-addressed store, hash-verified

1318 dom.unlink()
1319
1320 def checkRenameNodeSharedConstraints(self, doc, node):
1321 # Make sure illegal NS usage is detected:
1322 self.assertRaises(xml.dom.NamespaceErr, doc.renameNode, node,
1323 "http://xml.python.org/ns", "xmlns:foo")
1324 doc2 = parseString("<doc/>")
1325 self.assertRaises(xml.dom.WrongDocumentErr, doc2.renameNode, node,
1326 xml.dom.EMPTY_NAMESPACE, "foo")
1327
1328 def testRenameAttribute(self):
1329 doc = parseString("<doc a='v'/>")

Callers 2

testRenameAttributeMethod · 0.95
testRenameElementMethod · 0.95

Calls 2

parseStringFunction · 0.90
assertRaisesMethod · 0.45

Tested by

no test coverage detected