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

Method main

Lib/test/libregrtest/main.py:761–790  ·  view source on GitHub ↗
(self, tests: TestList | None = None)

Source from the content-addressed store, hash-verified

759 print()
760
761 def main(self, tests: TestList | None = None) -> NoReturn:
762 if self.want_add_python_opts:
763 self._add_python_opts()
764
765 self._init()
766
767 if self.want_cleanup:
768 cleanup_temp_dir(self.tmp_dir)
769 sys.exit(0)
770
771 if self.want_wait:
772 input("Press any key to continue...")
773
774 if self.pythoninfo:
775 self.run_pythoninfo()
776
777 setup_test_dir(self.test_dir)
778 selected, tests = self.find_tests(tests)
779
780 exitcode = 0
781 if self.want_list_tests:
782 self.list_tests(selected)
783 elif self.want_list_cases:
784 list_cases(selected,
785 match_tests=self.match_tests,
786 test_dir=self.test_dir)
787 else:
788 exitcode = self.run_tests(selected, tests)
789
790 sys.exit(exitcode)
791
792
793def main(tests=None, _add_python_opts=False, **kwargs) -> NoReturn:

Callers 15

pdb.pyFile · 0.45
test_yield_from.pyFile · 0.45
test_tty.pyFile · 0.45
test_wait4.pyFile · 0.45
test_netrc.pyFile · 0.45
test_unpack_ex.pyFile · 0.45
test_bisect.pyFile · 0.45
test_longexp.pyFile · 0.45
run_mainMethod · 0.45
test_timeit.pyFile · 0.45

Calls 11

_add_python_optsMethod · 0.95
_initMethod · 0.95
run_pythoninfoMethod · 0.95
find_testsMethod · 0.95
list_testsMethod · 0.95
run_testsMethod · 0.95
list_casesFunction · 0.90
cleanup_temp_dirFunction · 0.85
inputFunction · 0.85
setup_test_dirFunction · 0.70
exitMethod · 0.45

Tested by 15

run_mainMethod · 0.36
test_frozenMethod · 0.36
tfunc_importFunction · 0.36
test_fileMethod · 0.36
test_stdinMethod · 0.36
do_integration_testMethod · 0.36
test_mainMethod · 0.36
mainFunction · 0.36
run_cli_okMethod · 0.36
testFunction · 0.36
invoke_disMethod · 0.36