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

Method _get_error

Lib/test/test_xml_etree.py:4472–4476  ·  view source on GitHub ↗
(self, s)

Source from the content-addressed store, hash-verified

4470 self.assertIsInstance(ET.ParseError(), SyntaxError)
4471
4472 def _get_error(self, s):
4473 try:
4474 ET.fromstring(s)
4475 except ET.ParseError as e:
4476 return e
4477
4478 def test_error_position(self):
4479 self.assertEqual(self._get_error('foo').position, (1, 0))

Callers 2

test_error_positionMethod · 0.95
test_error_codeMethod · 0.95

Calls 1

fromstringMethod · 0.45

Tested by

no test coverage detected