##// END OF EJS Templates
Add a few more edge cases for prompt numbers in nbconvert
Jessica B. Hamrick -
Show More
@@ -178,6 +178,24 b''
178 "metadata": {},
178 "metadata": {},
179 "outputs": [],
179 "outputs": [],
180 "prompt_number": null
180 "prompt_number": null
181 },
182 {
183 "cell_type": "code",
184 "collapsed": false,
185 "input": [],
186 "language": "python",
187 "metadata": {},
188 "outputs": [],
189 "prompt_number": "*"
190 },
191 {
192 "cell_type": "code",
193 "collapsed": false,
194 "input": [],
195 "language": "python",
196 "metadata": {},
197 "outputs": [],
198 "prompt_number": 0
181 }
199 }
182 ],
200 ],
183 "metadata": {}
201 "metadata": {}
@@ -69,7 +69,7 b' class TestHTMLExporter(ExportersTestsBase):'
69 in_regex = r"In \[(.*)\]:"
69 in_regex = r"In \[(.*)\]:"
70 out_regex = r"Out\[(.*)\]:"
70 out_regex = r"Out\[(.*)\]:"
71
71
72 ins = ["1", "2", "6", "7", "8", "10", "14", " ", " "]
72 ins = ["1", "2", "6", "7", "8", "10", "14", " ", " ", "*", "0"]
73 outs = ["7", "10", "14"]
73 outs = ["7", "10", "14"]
74
74
75 assert re.findall(in_regex, output) == ins
75 assert re.findall(in_regex, output) == ins
@@ -110,7 +110,7 b' class TestLatexExporter(ExportersTestsBase):'
110 in_regex = r"In \[\{\\color\{incolor\}(.*)\}\]:"
110 in_regex = r"In \[\{\\color\{incolor\}(.*)\}\]:"
111 out_regex = r"Out\[\{\\color\{outcolor\}(.*)\}\]:"
111 out_regex = r"Out\[\{\\color\{outcolor\}(.*)\}\]:"
112
112
113 ins = ["1", "2", "6", "7", "8", "10", "14", " ", " "]
113 ins = ["1", "2", "6", "7", "8", "10", "14", " ", " ", "*", "0"]
114 outs = ["7", "10", "14"]
114 outs = ["7", "10", "14"]
115
115
116 assert re.findall(in_regex, output) == ins
116 assert re.findall(in_regex, output) == ins
General Comments 0
You need to be logged in to leave comments. Login now