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

Method get_exitcode

Lib/test/libregrtest/results.py:84–98  ·  view source on GitHub ↗
(self, fail_env_changed: bool, fail_rerun: bool)

Source from the content-addressed store, hash-verified

82 return ', '.join(state)
83
84 def get_exitcode(self, fail_env_changed: bool, fail_rerun: bool) -> int:
85 exitcode = 0
86 if self.bad:
87 exitcode = EXITCODE_BAD_TEST
88 elif self.interrupted:
89 exitcode = EXITCODE_INTERRUPTED
90 elif fail_env_changed and self.env_changed:
91 exitcode = EXITCODE_ENV_CHANGED
92 elif self.no_tests_run():
93 exitcode = EXITCODE_NO_TESTS_RAN
94 elif fail_rerun and self.rerun:
95 exitcode = EXITCODE_RERUN_FAIL
96 elif self.worker_bug:
97 exitcode = EXITCODE_BAD_TEST
98 return exitcode
99
100 def accumulate_result(self, result: TestResult, runtests: RunTests) -> None:
101 test_name = result.test_name

Callers 1

_run_testsMethod · 0.80

Calls 1

no_tests_runMethod · 0.95

Tested by

no test coverage detected