Test that io.stdin/out/err exist at startup
()
| 51 | self.tchan(chan) |
| 52 | |
| 53 | def 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 | |
| 64 | class TestIOStream(unittest.TestCase): |
| 65 |