MCPcopy Create free account
hub / github.com/ipython/ipython / test_io_init

Function test_io_init

IPython/utils/tests/test_io.py:53–62  ·  view source on GitHub ↗

Test that io.stdin/out/err exist at startup

()

Source from the content-addressed store, hash-verified

51 self.tchan(chan)
52
53def test_io_init():
54 """Test that io.stdin/out/err exist at startup"""
55 for name in ('stdin', 'stdout', 'stderr'):
56 cmd = "from IPython.utils import io;print(io.%s.__class__)"%name
57 with Popen([sys.executable, '-c', cmd], stdout=PIPE) as p:
58 p.wait()
59 classname = p.stdout.read().strip().decode('ascii')
60 # __class__ is a reference to the class object in Python 3, so we can't
61 # just test for string equality.
62 assert 'IPython.utils.io.IOStream' in classname, classname
63
64class TestIOStream(unittest.TestCase):
65

Callers

nothing calls this directly

Calls 2

waitMethod · 0.80
readMethod · 0.80

Tested by

no test coverage detected