MCPcopy Create free account
hub / github.com/codespell-project/codespell / FakeStdin

Function FakeStdin

codespell_lib/tests/test_basic.py:1428–1435  ·  view source on GitHub ↗
(text: str)

Source from the content-addressed store, hash-verified

1426
1427@contextlib.contextmanager
1428def FakeStdin(text: str) -> Generator[None, None, None]:
1429 oldin = sys.stdin
1430 try:
1431 in_ = StringIO(text)
1432 sys.stdin = in_
1433 yield
1434 finally:
1435 sys.stdin = oldin
1436
1437
1438def run_codespell_stdin(

Callers 3

test_interactivityFunction · 0.85
test_stdinFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…