File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -355,7 +355,7 @@ def do_shutdown(self, restart):
355
355
return dict (status = 'ok' , restart = restart )
356
356
357
357
def do_is_complete (self , code ):
358
- status , indent_spaces = self .shell .input_transformer_manager .check_complete (code )
358
+ status , indent_spaces = self .shell .input_splitter .check_complete (code )
359
359
r = {'status' : status }
360
360
if status == 'incomplete' :
361
361
r ['indent' ] = ' ' * indent_spaces
Original file line number Diff line number Diff line change @@ -224,7 +224,7 @@ def test_is_complete():
224
224
reply = kc .get_shell_msg (block = True , timeout = TIMEOUT )
225
225
assert reply ['content' ]['status' ] == 'complete'
226
226
227
- # SyntaxError should mean it's complete
227
+ # SyntaxError
228
228
kc .is_complete ('raise = 2' )
229
229
reply = kc .get_shell_msg (block = True , timeout = TIMEOUT )
230
230
assert reply ['content' ]['status' ] == 'invalid'
@@ -234,6 +234,11 @@ def test_is_complete():
234
234
assert reply ['content' ]['status' ] == 'incomplete'
235
235
assert reply ['content' ]['indent' ] == ''
236
236
237
+ # Cell magic ends on two blank lines for console UIs
238
+ kc .is_complete ('%%timeit\n a\n \n ' )
239
+ reply = kc .get_shell_msg (block = True , timeout = TIMEOUT )
240
+ assert reply ['content' ]['status' ] == 'complete'
241
+
237
242
238
243
def test_complete ():
239
244
with kernel () as kc :
You can’t perform that action at this time.
0 commit comments