MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_toxml_quote_attrib

Method test_toxml_quote_attrib

Lib/test/test_minidom.py:585–602  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

583 '<ws>\t\n\r </ws></elem>')
584
585 def test_toxml_quote_attrib(self):
586 dom = Document()
587 elem = dom.appendChild(dom.createElement('elem'))
588 elem.setAttribute("a", '&<>"')
589 elem.setAttribute("cr", "\r")
590 elem.setAttribute("lf", "\n")
591 elem.setAttribute("crlf", "\r\n")
592 elem.setAttribute("lflf", "\n\n")
593 elem.setAttribute("ws", "\t\n\r ")
594 domstr = dom.toxml()
595 dom.unlink()
596 self.assertEqual(domstr, '<?xml version="1.0" ?>'
597 '<elem a="&amp;&lt;&gt;&quot;" '
598 'cr="&#13;" '
599 'lf="&#10;" '
600 'crlf="&#13;&#10;" '
601 'lflf="&#10;&#10;" '
602 'ws="&#9;&#10;&#13; "/>')
603
604 @unittest.expectedFailure # TODO: RUSTPYTHON
605 def testAltNewline(self):

Callers

nothing calls this directly

Calls 7

appendChildMethod · 0.95
createElementMethod · 0.95
unlinkMethod · 0.95
DocumentClass · 0.90
setAttributeMethod · 0.80
toxmlMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected