Show More
@@ -53,7 +53,7 b' def from_dict(d):' | |||
|
53 | 53 | def new_output(output_type=None, output_text=None, output_png=None, |
|
54 | 54 | output_html=None, output_svg=None, output_latex=None, output_json=None, |
|
55 | 55 | output_javascript=None, output_jpeg=None, prompt_number=None, |
|
56 |
e |
|
|
56 | ename=None, evalue=None, traceback=None, stream=None): | |
|
57 | 57 | """Create a new code cell with input and output""" |
|
58 | 58 | output = NotebookNode() |
|
59 | 59 | if output_type is not None: |
@@ -82,8 +82,8 b' def new_output(output_type=None, output_text=None, output_png=None,' | |||
|
82 | 82 | output.prompt_number = int(prompt_number) |
|
83 | 83 | |
|
84 | 84 | if output_type == u'pyerr': |
|
85 |
if e |
|
|
86 |
output.e |
|
|
85 | if ename is not None: | |
|
86 | output.ename = unicode(ename) | |
|
87 | 87 | if evalue is not None: |
|
88 | 88 | output.evalue = unicode(evalue) |
|
89 | 89 | if traceback is not None: |
@@ -85,7 +85,7 b' ws.cells.append(new_code_cell(' | |||
|
85 | 85 | output_javascript=u'var i=0;' |
|
86 | 86 | ),new_output( |
|
87 | 87 | output_type=u'pyerr', |
|
88 |
e |
|
|
88 | ename=u'NameError', | |
|
89 | 89 | evalue=u'NameError was here', |
|
90 | 90 | traceback=[u'frame 0', u'frame 1', u'frame 2'] |
|
91 | 91 | ),new_output( |
@@ -29,11 +29,11 b' class TestCell(TestCase):' | |||
|
29 | 29 | self.assertEqual(cc.collapsed, True) |
|
30 | 30 | |
|
31 | 31 | def test_pyerr(self): |
|
32 |
o = new_output(output_type=u'pyerr', e |
|
|
32 | o = new_output(output_type=u'pyerr', ename=u'NameError', | |
|
33 | 33 | evalue=u'Name not found', traceback=[u'frame 0', u'frame 1', u'frame 2'] |
|
34 | 34 | ) |
|
35 | 35 | self.assertEqual(o.output_type, u'pyerr') |
|
36 |
self.assertEqual(o.e |
|
|
36 | self.assertEqual(o.ename, u'NameError') | |
|
37 | 37 | self.assertEqual(o.evalue, u'Name not found') |
|
38 | 38 | self.assertEqual(o.traceback, [u'frame 0', u'frame 1', u'frame 2']) |
|
39 | 39 |
@@ -949,7 +949,7 b' Message type: ``crash``::' | |||
|
949 | 949 | |
|
950 | 950 | content = { |
|
951 | 951 | # Similarly to the 'error' case for execute_reply messages, this will |
|
952 |
# contain ename, e |
|
|
952 | # contain ename, evalue and traceback fields. | |
|
953 | 953 | |
|
954 | 954 | # An additional field with supplementary information such as where to |
|
955 | 955 | # send the crash message |
General Comments 0
You need to be logged in to leave comments.
Login now