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

Method test_1463026_2_empty

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

Source from the content-addressed store, hash-verified

676 self.assertEqual(result.getvalue(), self.xml('<a xmlns="qux"></a>'))
677
678 def test_1463026_2_empty(self):
679 result = self.ioclass()
680 gen = XMLGenerator(result, short_empty_elements=True)
681
682 gen.startDocument()
683 gen.startPrefixMapping(None, 'qux')
684 gen.startElementNS(('qux', 'a'), 'a', {})
685 gen.endElementNS(('qux', 'a'), 'a')
686 gen.endPrefixMapping(None)
687 gen.endDocument()
688
689 self.assertEqual(result.getvalue(), self.xml('<a xmlns="qux"/>'))
690
691 def test_1463026_3(self):
692 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