MCPcopy Index your code
hub / github.com/ipython/ipython / test_import_ipython_handles_stdout_without_isatty

Function test_import_ipython_handles_stdout_without_isatty

tests/test_kitty.py:34–55  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

32
33
34def test_import_ipython_handles_stdout_without_isatty():
35 code = """
36import sys
37
38class DummyFile:
39 def write(self, *args, **kwargs):
40 pass
41
42 def flush(self):
43 pass
44
45sys.stdout = DummyFile()
46import IPython
47"""
48 repo_root = Path(__file__).resolve().parents[1]
49 result = subprocess.run(
50 [sys.executable, "-c", code],
51 cwd=repo_root,
52 capture_output=True,
53 text=True,
54 )
55 assert result.returncode == 0, result.stderr
56
57
58def test_supports_kitty_graphics_handles_psutil_access_denied(monkeypatch):

Callers

nothing calls this directly

Calls 1

runMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…