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

Method test_1463026_3_empty

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

Source from the content-addressed store, hash-verified

695 self.xml('<my:a xmlns:my="qux" b="c"></my:a>'))
696
697 def test_1463026_3_empty(self):
698 result = self.ioclass()
699 gen = XMLGenerator(result, short_empty_elements=True)
700
701 gen.startDocument()
702 gen.startPrefixMapping('my', 'qux')
703 gen.startElementNS(('qux', 'a'), 'a', {(None, 'b'):'c'})
704 gen.endElementNS(('qux', 'a'), 'a')
705 gen.endPrefixMapping('my')
706 gen.endDocument()
707
708 self.assertEqual(result.getvalue(),
709 self.xml('<my:a xmlns:my="qux" b="c"/>'))
710
711 def test_5027_1(self):
712 # The xml prefix (as in xml:lang below) is reserved and bound by

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