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

Function check_impl_detail

Lib/test/support/__init__.py:1375–1383  ·  view source on GitHub ↗

This function returns True or False depending on the host platform. Examples: if check_impl_detail(): # only on CPython (default) if check_impl_detail(jython=True): # only on Jython if check_impl_detail(cpython=False): # everywhere except on CPy

(**guards)

Source from the content-addressed store, hash-verified

1373# Use the following check to guard CPython's implementation-specific tests --
1374# or to run them only on the implementation(s) guarded by the arguments.
1375def check_impl_detail(**guards):
1376 """This function returns True or False depending on the host platform.
1377 Examples:
1378 if check_impl_detail(): # only on CPython (default)
1379 if check_impl_detail(jython=True): # only on Jython
1380 if check_impl_detail(cpython=False): # everywhere except on CPython
1381 """
1382 guards, default = _parse_guards(guards)
1383 return guards.get(sys.implementation.name, default)
1384
1385
1386def no_tracing(func):

Callers 7

test_opcache.pyFile · 0.90
test_code.pyFile · 0.90
_common_test_wrapcolMethod · 0.90
_common_test_wrapcolMethod · 0.90
impl_detailFunction · 0.85
__init__.pyFile · 0.85

Calls 2

_parse_guardsFunction · 0.85
getMethod · 0.45

Tested by 3

_common_test_wrapcolMethod · 0.72
_common_test_wrapcolMethod · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…