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

Method get_output

Lib/test/test_remote_pdb.py:66–76  ·  view source on GitHub ↗

Get the output that was written by the object being tested.

(self)

Source from the content-addressed store, hash-verified

64 self.input_queue.append(json.dumps(data).encode() + b"\n")
65
66 def get_output(self) -> List[dict]:
67 """Get the output that was written by the object being tested."""
68 results = []
69 for data in self.output_buffer:
70 if isinstance(data, bytes) and data.endswith(b"\n"):
71 try:
72 results.append(json.loads(data.decode().strip()))
73 except json.JSONDecodeError:
74 pass # Ignore non-JSON output
75 self.output_buffer = []
76 return results
77
78
79class PdbClientTestCase(unittest.TestCase):

Callers 5

test_completionMethod · 0.45
test_do_helpMethod · 0.45
test_cmdloopMethod · 0.45

Calls 5

endswithMethod · 0.45
appendMethod · 0.45
loadsMethod · 0.45
stripMethod · 0.45
decodeMethod · 0.45

Tested by

no test coverage detected