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

Method test_builtin_compat

Lib/test/test_import/__init__.py:2345–2354  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2343
2344 @unittest.skipIf(_testinternalcapi is None, "requires _testinternalcapi")
2345 def test_builtin_compat(self):
2346 # For now we avoid using sys or builtins
2347 # since they still don't implement multi-phase init.
2348 module = '_imp'
2349 require_builtin(module)
2350 if not Py_GIL_DISABLED:
2351 with self.subTest(f'{module}: not strict'):
2352 self.check_compatible_here(module, strict=False)
2353 with self.subTest(f'{module}: strict, not fresh'):
2354 self.check_compatible_here(module, strict=True)
2355
2356 @cpython_only
2357 @unittest.skipIf(_testinternalcapi is None, "requires _testinternalcapi")

Callers

nothing calls this directly

Calls 3

check_compatible_hereMethod · 0.95
require_builtinFunction · 0.85
subTestMethod · 0.45

Tested by

no test coverage detected