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

Method check

Lib/test/test_xml_etree.py:2232–2236  ·  view source on GitHub ↗
(elem)

Source from the content-addressed store, hash-verified

2230 # marshaller gives obscure errors for non-string values
2231
2232 def check(elem):
2233 with self.assertRaises(TypeError) as cm:
2234 serialize(elem)
2235 self.assertEqual(str(cm.exception),
2236 'cannot serialize 123 (type int)')
2237
2238 elem = ET.Element(123)
2239 check(elem) # tag

Callers

nothing calls this directly

Calls 4

serializeFunction · 0.85
strFunction · 0.85
assertRaisesMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected