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

Method run_test

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

Source from the content-addressed store, hash-verified

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

Callers 1

Calls 6

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

Tested by

no test coverage detected