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

Method test_expat224_utf8_bug_file

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

Source from the content-addressed store, hash-verified

2524
2525 @unittest.expectedFailure # TODO: RUSTPYTHON
2526 def test_expat224_utf8_bug_file(self):
2527 with open(UTF8_BUG_XMLFILE, 'rb') as fp:
2528 raw = fp.read()
2529 root = ET.fromstring(raw)
2530 xmlattr = root.get('b')
2531
2532 # "Parse" manually the XML file to extract the value of the 'b'
2533 # attribute of the <a b='xxx' /> XML element
2534 text = raw.decode('utf-8').strip()
2535 text = text.replace('\r\n', ' ')
2536 text = text[6:-4]
2537 self.assertEqual(root.get('b'), text)
2538
2539 def test_39495_treebuilder_start(self):
2540 self.assertRaises(TypeError, ET.TreeBuilder().start, "tag")

Callers

nothing calls this directly

Calls 8

openFunction · 0.50
readMethod · 0.45
fromstringMethod · 0.45
getMethod · 0.45
stripMethod · 0.45
decodeMethod · 0.45
replaceMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected