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

Method check

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

Source from the content-addressed store, hash-verified

2186 # marshaller gives obscure errors for non-string values
2187
2188 def check(elem):
2189 with self.assertRaises(TypeError) as cm:
2190 serialize(elem)
2191 self.assertEqual(str(cm.exception),
2192 'cannot serialize 123 (type int)')
2193
2194 elem = ET.Element(123)
2195 check(elem) # tag

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected