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

Function _parse_guards

Lib/test/support/__init__.py:1365–1371  ·  view source on GitHub ↗
(guards)

Source from the content-addressed store, hash-verified

1363 return unittest.skip(msg)
1364
1365def _parse_guards(guards):
1366 # Returns a tuple ({platform_name: run_me}, default_value)
1367 if not guards:
1368 return ({'cpython': True}, False)
1369 is_true = list(guards.values())[0]
1370 assert list(guards.values()) == [is_true] * len(guards) # all True or all False
1371 return (guards, not is_true)
1372
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.

Callers 2

impl_detailFunction · 0.85
check_impl_detailFunction · 0.85

Calls 2

listClass · 0.85
valuesMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…