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

Method run_test

Lib/test/libregrtest/main.py:378–394  ·  view source on GitHub ↗
(
        self, test_name: TestName, runtests: RunTests, tracer: trace.Trace | None
    )

Source from the content-addressed store, hash-verified

376 self.quiet, self.print_slowest)
377
378 def run_test(
379 self, test_name: TestName, runtests: RunTests, tracer: trace.Trace | None
380 ) -> TestResult:
381 if tracer is not None:
382 # If we're tracing code coverage, then we don't exit with status
383 # if on a false return value from main.
384 cmd = ('result = run_single_test(test_name, runtests)')
385 namespace = dict(locals())
386 tracer.runctx(cmd, globals=globals(), locals=namespace)
387 result = namespace['result']
388 result.covered_lines = list(tracer.counts)
389 else:
390 result = run_single_test(test_name, runtests)
391
392 self.results.accumulate_result(result, runtests)
393
394 return result
395
396 def run_tests_sequentially(self, runtests: RunTests) -> None:
397 if self.coverage:

Callers 1

Calls 4

listClass · 0.85
run_single_testFunction · 0.85
accumulate_resultMethod · 0.80
runctxMethod · 0.45

Tested by

no test coverage detected