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

Function check_impl_detail

Lib/test/support/__init__.py:1297–1305  ·  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

1295# Use the following check to guard CPython's implementation-specific tests --
1296# or to run them only on the implementation(s) guarded by the arguments.
1297def check_impl_detail(**guards):
1298 """This function returns True or False depending on the host platform.
1299 Examples:
1300 if check_impl_detail(): # only on CPython (default)
1301 if check_impl_detail(jython=True): # only on Jython
1302 if check_impl_detail(cpython=False): # everywhere except on CPython
1303 """
1304 guards, default = _parse_guards(guards)
1305 return guards.get(sys.implementation.name, default)
1306
1307
1308def no_tracing(func):

Callers 5

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

Calls 2

_parse_guardsFunction · 0.85
getMethod · 0.45

Tested by 1