(self)
| 2321 | self.assertEqual(converted, interpid) |
| 2322 | |
| 2323 | def test_conversion_bad(self): |
| 2324 | convert = _testinternalcapi.normalize_interp_id |
| 2325 | |
| 2326 | for badid in [ |
| 2327 | object(), |
| 2328 | 10.0, |
| 2329 | '10', |
| 2330 | b'10', |
| 2331 | ]: |
| 2332 | with self.subTest(f'bad: {badid!r}'): |
| 2333 | with self.assertRaises(TypeError): |
| 2334 | convert(badid) |
| 2335 | |
| 2336 | badid = -1 |
| 2337 | with self.subTest(f'bad: {badid!r}'): |
| 2338 | with self.assertRaises(ValueError): |
| 2339 | convert(badid) |
| 2340 | |
| 2341 | badid = 2**64 |
| 2342 | with self.subTest(f'bad: {badid!r}'): |
| 2343 | with self.assertRaises(OverflowError): |
| 2344 | convert(badid) |
| 2345 | |
| 2346 | def test_lookup_exists(self): |
| 2347 | interpid = self.new_interpreter() |
nothing calls this directly
no test coverage detected