MCPcopy Create free account
hub / github.com/python/cpython / test_conversion_coerced

Method test_conversion_coerced

Lib/test/test_capi/test_misc.py:2309–2315  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2307 self.assertEqual(interpid, 10)
2308
2309 def test_conversion_coerced(self):
2310 convert = _testinternalcapi.normalize_interp_id
2311 class MyInt(str):
2312 def __index__(self):
2313 return 10
2314 interpid = convert(MyInt())
2315 self.assertEqual(interpid, 10)
2316
2317 def test_conversion_from_interpreter(self):
2318 convert = _testinternalcapi.normalize_interp_id

Callers

nothing calls this directly

Calls 3

MyIntClass · 0.70
convertFunction · 0.50
assertEqualMethod · 0.45

Tested by

no test coverage detected