diff --git a/IPython/html/tests/launchnotebook.py b/IPython/html/tests/launchnotebook.py index f9a9058..409f0e0 100644 --- a/IPython/html/tests/launchnotebook.py +++ b/IPython/html/tests/launchnotebook.py @@ -1,13 +1,14 @@ """Base class for notebook tests.""" -import os import sys import time import requests from contextlib import contextmanager -from subprocess import Popen, PIPE +from subprocess import Popen, STDOUT from unittest import TestCase +import nose + from IPython.utils.tempdir import TemporaryDirectory class NotebookTestBase(TestCase): @@ -55,11 +56,11 @@ class NotebookTestBase(TestCase): '--ipython-dir=%s' % cls.ipython_dir.name, '--notebook-dir=%s' % cls.notebook_dir.name, ] - devnull = open(os.devnull, 'w') cls.notebook = Popen(notebook_args, - stdout=devnull, - stderr=devnull, + stdout=nose.ipy_stream_capturer.writefd, + stderr=STDOUT, ) + nose.ipy_stream_capturer.ensure_started() cls.wait_until_alive() @classmethod