MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / testall

Function testall

tools/python-3.11.9-amd64/Lib/imghdr.py:153–172  ·  view source on GitHub ↗
(list, recursive, toplevel)

Source from the content-addressed store, hash-verified

151 sys.exit(1)
152
153def testall(list, recursive, toplevel):
154 import sys
155 import os
156 for filename in list:
157 if os.path.isdir(filename):
158 print(filename + '/:', end=' ')
159 if recursive or toplevel:
160 print('recursing down:')
161 import glob
162 names = glob.glob(os.path.join(glob.escape(filename), '*'))
163 testall(names, recursive, 0)
164 else:
165 print('*** directory (use -r) ***')
166 else:
167 print(filename + ':', end=' ')
168 sys.stdout.flush()
169 try:
170 print(what(filename))
171 except OSError:
172 print('*** not found ***')
173
174if __name__ == '__main__':
175 test()

Callers 1

testFunction · 0.70

Calls 7

whatFunction · 0.70
printFunction · 0.50
isdirMethod · 0.45
globMethod · 0.45
joinMethod · 0.45
escapeMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected