File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -505,12 +505,13 @@ def test_kernel_death(self):
505
505
output_nb = executor .execute ()
506
506
km = executor .start_kernel_manager ()
507
507
508
- with patch .object (km , "is_alive" ) as alive_mock :
509
- alive_mock .return_value = False
510
- # Will be a RuntimeError or subclass DeadKernelError depending
511
- # on if jupyter_client or nbconvert catches the dead client first
512
- with pytest .raises (RuntimeError ):
513
- input_nb , output_nb = executor .execute ()
508
+ async def is_alive ():
509
+ return False
510
+ km .is_alive = is_alive
511
+ # Will be a RuntimeError or subclass DeadKernelError depending
512
+ # on if jupyter_client or nbconvert catches the dead client first
513
+ with pytest .raises (RuntimeError ):
514
+ input_nb , output_nb = executor .execute ()
514
515
515
516
def test_allow_errors (self ):
516
517
"""
You can’t perform that action at this time.
0 commit comments