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

Method test_1463026_2

Lib/test/test_sax.py:657–668  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

655 self.assertEqual(result.getvalue(), self.xml('<a b="c"/>'))
656
657 def test_1463026_2(self):
658 result = self.ioclass()
659 gen = XMLGenerator(result)
660
661 gen.startDocument()
662 gen.startPrefixMapping(None, 'qux')
663 gen.startElementNS(('qux', 'a'), 'a', {})
664 gen.endElementNS(('qux', 'a'), 'a')
665 gen.endPrefixMapping(None)
666 gen.endDocument()
667
668 self.assertEqual(result.getvalue(), self.xml('<a xmlns="qux"></a>'))
669
670 def test_1463026_2_empty(self):
671 result = self.ioclass()

Callers

nothing calls this directly

Calls 11

startDocumentMethod · 0.95
startPrefixMappingMethod · 0.95
startElementNSMethod · 0.95
endElementNSMethod · 0.95
endPrefixMappingMethod · 0.95
endDocumentMethod · 0.95
XMLGeneratorClass · 0.90
ioclassMethod · 0.45
assertEqualMethod · 0.45
getvalueMethod · 0.45
xmlMethod · 0.45

Tested by

no test coverage detected