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

Function collect_resource

Lib/test/pythoninfo.py:710–722  ·  view source on GitHub ↗
(info_add)

Source from the content-addressed store, hash-verified

708
709
710def collect_resource(info_add):
711 try:
712 import resource
713 except ImportError:
714 return
715
716 limits = [attr for attr in dir(resource) if attr.startswith('RLIMIT_')]
717 for name in limits:
718 key = getattr(resource, name)
719 value = resource.getrlimit(key)
720 info_add('resource.%s' % name, value)
721
722 call_func(info_add, 'resource.pagesize', resource, 'getpagesize')
723
724
725def collect_test_socket(info_add):

Callers

nothing calls this directly

Calls 4

dirFunction · 0.85
getattrFunction · 0.85
call_funcFunction · 0.85
startswithMethod · 0.45

Tested by

no test coverage detected