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

Method test_1463026_3

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

Source from the content-addressed store, hash-verified

681 self.assertEqual(result.getvalue(), self.xml('<a xmlns="qux"/>'))
682
683 def test_1463026_3(self):
684 result = self.ioclass()
685 gen = XMLGenerator(result)
686
687 gen.startDocument()
688 gen.startPrefixMapping('my', 'qux')
689 gen.startElementNS(('qux', 'a'), 'a', {(None, 'b'):'c'})
690 gen.endElementNS(('qux', 'a'), 'a')
691 gen.endPrefixMapping('my')
692 gen.endDocument()
693
694 self.assertEqual(result.getvalue(),
695 self.xml('<my:a xmlns:my="qux" b="c"></my:a>'))
696
697 def test_1463026_3_empty(self):
698 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