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

Method main

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

Source from the content-addressed store, hash-verified

753 return self._tmp_dir
754
755 def main(self, tests: TestList | None = None) -> NoReturn:
756 if self.want_add_python_opts:
757 self._add_python_opts()
758
759 self._init()
760
761 if self.want_cleanup:
762 cleanup_temp_dir(self.tmp_dir)
763 sys.exit(0)
764
765 if self.want_wait:
766 input("Press any key to continue...")
767
768 setup_test_dir(self.test_dir)
769 selected, tests = self.find_tests(tests)
770
771 exitcode = 0
772 if self.want_list_tests:
773 self.list_tests(selected)
774 elif self.want_list_cases:
775 list_cases(selected,
776 match_tests=self.match_tests,
777 test_dir=self.test_dir)
778 else:
779 exitcode = self.run_tests(selected, tests)
780
781 sys.exit(exitcode)
782
783
784def 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
test_codecs.pyFile · 0.45

Calls 10

_add_python_optsMethod · 0.95
_initMethod · 0.95
find_testsMethod · 0.95
list_testsMethod · 0.95
run_testsMethod · 0.95
list_casesFunction · 0.90
cleanup_temp_dirFunction · 0.85
setup_test_dirFunction · 0.70
inputFunction · 0.50
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
test_mainMethod · 0.36
run_cli_okMethod · 0.36
testFunction · 0.36
invoke_disMethod · 0.36