##// END OF EJS Templates
Capture server logs when running notebook tests
Thomas Kluyver -
Show More
@@ -1,13 +1,14 b''
1 1 """Base class for notebook tests."""
2 2
3 import os
4 3 import sys
5 4 import time
6 5 import requests
7 6 from contextlib import contextmanager
8 from subprocess import Popen, PIPE
7 from subprocess import Popen, STDOUT
9 8 from unittest import TestCase
10 9
10 import nose
11
11 12 from IPython.utils.tempdir import TemporaryDirectory
12 13
13 14 class NotebookTestBase(TestCase):
@@ -55,11 +56,11 b' class NotebookTestBase(TestCase):'
55 56 '--ipython-dir=%s' % cls.ipython_dir.name,
56 57 '--notebook-dir=%s' % cls.notebook_dir.name,
57 58 ]
58 devnull = open(os.devnull, 'w')
59 59 cls.notebook = Popen(notebook_args,
60 stdout=devnull,
61 stderr=devnull,
60 stdout=nose.ipy_stream_capturer.writefd,
61 stderr=STDOUT,
62 62 )
63 nose.ipy_stream_capturer.ensure_started()
63 64 cls.wait_until_alive()
64 65
65 66 @classmethod
General Comments 0
You need to be logged in to leave comments. Login now