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

Function run_tests

Lib/test/bisect_cmd.py:75–92  ·  view source on GitHub ↗
(args, tests, huntrleaks=None)

Source from the content-addressed store, hash-verified

73
74
75def run_tests(args, tests, huntrleaks=None):
76 tmp = tempfile.mktemp()
77 try:
78 write_tests(tmp, tests)
79
80 cmd = python_cmd()
81 cmd.extend(['-u', '-m', 'test', '--matchfile', tmp])
82 cmd.extend(args.test_args)
83 print("+ %s" % format_shell_args(cmd))
84
85 sys.stdout.flush()
86 sys.stderr.flush()
87
88 proc = subprocess.run(cmd)
89 return proc.returncode
90 finally:
91 if os.path.exists(tmp):
92 os.unlink(tmp)
93
94
95def parse_args():

Callers 2

mainFunction · 0.85
test_loads_recursionMethod · 0.85

Calls 9

write_testsFunction · 0.85
python_cmdFunction · 0.85
format_shell_argsFunction · 0.85
mktempMethod · 0.80
extendMethod · 0.45
flushMethod · 0.45
runMethod · 0.45
existsMethod · 0.45
unlinkMethod · 0.45

Tested by 1

test_loads_recursionMethod · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…