mirror of
https://github.com/jupyter/notebook.git
synced 2024-11-27 03:20:27 +08:00
io.Term.cin/out/err replaced by io.stdin/out/err
Behavior is now the same as sys.stdin/out/err, and defaults to those streams.
This commit is contained in:
parent
f32e2bb944
commit
0de0a0d4ab
@ -15,6 +15,7 @@
|
||||
import sys
|
||||
|
||||
from cStringIO import StringIO
|
||||
from subprocess import Popen, PIPE
|
||||
|
||||
import nose.tools as nt
|
||||
|
||||
@ -59,3 +60,12 @@ class TeeTestCase(dec.ParametricTestCase):
|
||||
for chan in ['stdout', 'stderr']:
|
||||
for check in ['close', 'del']:
|
||||
yield self.tchan(chan, check)
|
||||
|
||||
def test_io_init():
|
||||
"""Test that io.stdin/out/err exist at startup"""
|
||||
for name in ('stdin', 'stdout', 'stderr'):
|
||||
p = Popen([sys.executable, '-c', "from IPython.utils import io;print io.%s.__class__"%name],
|
||||
stdout=PIPE)
|
||||
p.wait()
|
||||
classname = p.stdout.read().strip()
|
||||
nt.assert_equals(classname, 'IPython.utils.io.IOStream')
|
||||
|
Loading…
Reference in New Issue
Block a user