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

Method test_pickle_issue18997

Lib/test/test_xml_etree.py:2748–2759  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2746 self.assertEqualElements(e, e2)
2747
2748 def test_pickle_issue18997(self):
2749 for proto in range(2, pickle.HIGHEST_PROTOCOL + 1):
2750 for dumper, loader in product(self.modules, repeat=2):
2751 XMLTEXT = """<?xml version="1.0"?>
2752 <group><dogs>4</dogs>
2753 </group>"""
2754 e1 = dumper.fromstring(XMLTEXT)
2755 self.assertEqual(e1.__getstate__()['tag'], 'group')
2756 e2 = self.pickleRoundTrip(e1, 'xml.etree.ElementTree',
2757 dumper, loader, proto)
2758 self.assertEqual(e2.tag, 'group')
2759 self.assertEqual(e2[0].tag, 'dogs')
2760
2761
2762class BadElementTest(ElementTestCase, unittest.TestCase):

Callers

nothing calls this directly

Calls 4

pickleRoundTripMethod · 0.80
fromstringMethod · 0.45
assertEqualMethod · 0.45
__getstate__Method · 0.45

Tested by

no test coverage detected