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

Function requires_resource

Lib/test/support/__init__.py:1260–1266  ·  view source on GitHub ↗
(resource)

Source from the content-addressed store, hash-verified

1258 return obj
1259
1260def requires_resource(resource):
1261 if resource == 'gui' and not _is_gui_available():
1262 return unittest.skip(_is_gui_available.reason)
1263 if is_resource_enabled(resource):
1264 return _id
1265 else:
1266 return unittest.skip("resource {0!r} is not enabled".format(resource))
1267
1268def cpython_only(test):
1269 """

Callers

nothing calls this directly

Calls 4

_is_gui_availableFunction · 0.85
is_resource_enabledFunction · 0.85
skipMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected