MCPcopy Create free account
hub / github.com/RustPython/RustPython / collect_info

Function collect_info

Lib/test/pythoninfo.py:1014–1072  ·  view source on GitHub ↗
(info)

Source from the content-addressed store, hash-verified

1012
1013
1014def collect_info(info):
1015 error = False
1016 info_add = info.add
1017
1018 for collect_func in (
1019 # collect_urandom() must be the first, to check the getrandom() status.
1020 # Other functions may block on os.urandom() indirectly and so change
1021 # its state.
1022 collect_urandom,
1023
1024 collect_builtins,
1025 collect_cc,
1026 collect_curses,
1027 collect_datetime,
1028 collect_decimal,
1029 collect_expat,
1030 collect_fips,
1031 collect_gdb,
1032 collect_gdbm,
1033 collect_get_config,
1034 collect_locale,
1035 collect_os,
1036 collect_platform,
1037 collect_pwd,
1038 collect_readline,
1039 collect_resource,
1040 collect_socket,
1041 collect_sqlite,
1042 collect_ssl,
1043 collect_subprocess,
1044 collect_sys,
1045 collect_sysconfig,
1046 collect_testcapi,
1047 collect_testinternalcapi,
1048 collect_tempfile,
1049 collect_time,
1050 collect_tkinter,
1051 collect_windows,
1052 collect_zlib,
1053 collect_libregrtest_utils,
1054
1055 # Collecting from tests should be last as they have side effects.
1056 collect_test_socket,
1057 collect_support,
1058 collect_support_os_helper,
1059 collect_support_socket_helper,
1060 collect_support_threading_helper,
1061 ):
1062 try:
1063 collect_func(info_add)
1064 except Exception:
1065 error = True
1066 print("ERROR: %s() failed" % (collect_func.__name__),
1067 file=sys.stderr)
1068 traceback.print_exc(file=sys.stderr)
1069 print(file=sys.stderr)
1070 sys.stderr.flush()
1071

Callers 1

mainFunction · 0.85

Calls 3

print_excMethod · 0.80
printFunction · 0.50
flushMethod · 0.45

Tested by

no test coverage detected