MCPcopy Index your code
hub / github.com/evalplus/evalplus / Capturing

Class Capturing

tools/_experimental/evaluate_coverage.py:27–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25
26
27class Capturing(list):
28 def __enter__(self):
29 self._stdout = sys.stdout
30 sys.stdout = self._stringio = StringIO()
31 return self
32
33 def __exit__(self, *args):
34 self.extend(self._stringio.getvalue().splitlines())
35 del self._stringio
36 sys.stdout = self._stdout
37
38
39def parse_lcov(outputs: List[str], func: Callable, mode: str = "branch"):

Callers 1

test_code_coverageFunction · 0.70

Calls

no outgoing calls

Tested by 1

test_code_coverageFunction · 0.56