MCPcopy Create free account
hub / github.com/ezyang/ghstack / flog

Method flog

test_shell.py:51–57  ·  view source on GitHub ↗
(self, cm: "unittest._AssertLogsContext")

Source from the content-addressed store, hash-verified

49 return self.sh.sh(*args, **kwargs)
50
51 def flog(self, cm: "unittest._AssertLogsContext") -> str: # type: ignore[name-defined]
52 def redact(s: str) -> str:
53 s = s.replace(sys.executable, "python")
54 s = s.replace("'python'", "python")
55 return s
56
57 return "\n".join(redact(r.getMessage()) for r in cm.records)
58
59 def test_stdout(self) -> None:
60 with self.assertLogs(level=logging.DEBUG) as cm:

Callers 5

test_stdoutMethod · 0.95
test_stderrMethod · 0.95
test_stdout_passthruMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected