##// END OF EJS Templates
Also add a test to check that an error is raised on timeout by default
Jessica B. Hamrick -
Show More
@@ -11,12 +11,18 b' import io'
11 11 import os
12 12 import re
13 13
14 try:
15 from queue import Empty # Py 3
16 except ImportError:
17 from Queue import Empty # Py 2
18
14 19 from IPython import nbformat
15 20
16 21 from .base import PreprocessorTestsBase
17 22 from ..execute import ExecutePreprocessor
18 23
19 24 from IPython.nbconvert.filters import strip_ansi
25 from nose.tools import assert_raises
20 26
21 27 addr_pat = re.compile(r'0x[0-9a-f]{7,9}')
22 28
@@ -135,3 +141,9 b' class TestExecute(PreprocessorTestsBase):'
135 141 self.assertEqual(output['output_type'], 'error')
136 142 self.assertEqual(output['ename'], 'StdinNotImplementedError')
137 143 self.assertEqual(output['evalue'], 'raw_input was called, but this frontend does not support input requests.')
144
145 def test_timeout(self):
146 """Check that an error is raised when a computation times out"""
147 current_dir = os.path.dirname(__file__)
148 filename = os.path.join(current_dir, 'files', 'Interrupt.ipynb')
149 assert_raises(Empty, self.run_notebook, filename, dict(timeout=1))
General Comments 0
You need to be logged in to leave comments. Login now