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

Method read_stdout

Lib/test/libregrtest/run_workers.py:310–320  ·  view source on GitHub ↗
(self, stdout_file: TextIO)

Source from the content-addressed store, hash-verified

308 return (retcode, tmp_files)
309
310 def read_stdout(self, stdout_file: TextIO) -> str:
311 stdout_file.seek(0)
312 try:
313 return stdout_file.read().strip()
314 except Exception as exc:
315 # gh-101634: Catch UnicodeDecodeError if stdout cannot be
316 # decoded from encoding
317 raise WorkerError(self.test_name,
318 f"Cannot read process stdout: {exc}",
319 stdout=None,
320 state=State.WORKER_BUG)
321
322 def read_json(self, json_file: JsonFile, json_tmpfile: TextIO | None,
323 stdout: str) -> tuple[TestResult, str]:

Callers 1

_runtestMethod · 0.95

Calls 4

WorkerErrorClass · 0.85
seekMethod · 0.45
stripMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected