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

Method test_1463026_2_empty

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

Source from the content-addressed store, hash-verified

668 self.assertEqual(result.getvalue(), self.xml('<a xmlns="qux"></a>'))
669
670 def test_1463026_2_empty(self):
671 result = self.ioclass()
672 gen = XMLGenerator(result, short_empty_elements=True)
673
674 gen.startDocument()
675 gen.startPrefixMapping(None, 'qux')
676 gen.startElementNS(('qux', 'a'), 'a', {})
677 gen.endElementNS(('qux', 'a'), 'a')
678 gen.endPrefixMapping(None)
679 gen.endDocument()
680
681 self.assertEqual(result.getvalue(), self.xml('<a xmlns="qux"/>'))
682
683 def test_1463026_3(self):
684 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