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

Method run_test

Tools/picklebench/memory_dos_impact.py:438–444  ·  view source on GitHub ↗

Run benchmark for a single test object.

(self, name: str, obj: Any)

Source from the content-addressed store, hash-verified

436 self.results = {}
437
438 def run_test(self, name: str, obj: Any) -> Dict[str, Any]:
439 """Run benchmark for a single test object."""
440 bench = PickleBenchmark(obj, self.protocol, self.iterations)
441 results = bench.run_all()
442 results['test_name'] = name
443 results['object_type'] = type(obj).__name__
444 return results
445
446 def run_all_tests(self) -> Dict[str, Dict[str, Any]]:
447 """Run comprehensive test suite across all sizes and types."""

Callers 1

run_all_testsMethod · 0.95

Calls 2

run_allMethod · 0.95
PickleBenchmarkClass · 0.85

Tested by

no test coverage detected