diff --git a/jupyter-kernel-manager.el b/jupyter-kernel-manager.el index 16adab5..c92b93d 100644 --- a/jupyter-kernel-manager.el +++ b/jupyter-kernel-manager.el @@ -104,9 +104,8 @@ implementation of `jupyter-kill-kernel'. A convenience method, `jupyter-kernel-name', is provided to access the name of the kernelspec.") -(cl-defmethod jupyter-kill-kernel ((kernel jupyter-meta-kernel)) - (when (slot-boundp kernel 'session) - (slot-makeunbound kernel 'session))) +(cl-defmethod jupyter-kill-kernel ((_kernel jupyter-meta-kernel)) + (ignore)) (cl-defmethod jupyter-kernel-name ((kernel jupyter-meta-kernel)) "Return the name of KERNEL." diff --git a/test/jupyter-test.el b/test/jupyter-test.el index 574a09e..5098872 100644 --- a/test/jupyter-test.el +++ b/test/jupyter-test.el @@ -623,8 +623,6 @@ (should-error (jupyter-start-kernel kernel)) (jupyter-kill-kernel kernel) (should-not (jupyter-kernel-alive-p kernel)) - ;; A session should not be re-used across kernels - (should-not (slot-boundp kernel 'session)) (setq conn-info (jupyter-create-connection-info)) (ert-info ("`jupyter-kernel-manager'") ;; TODO: Should the manager create a session if one isn't present? @@ -659,11 +657,9 @@ (should-not (jupyter-kernel-alive-p kernel)) (jupyter-start-kernel kernel) (should (jupyter-kernel-alive-p kernel)) - (should (oref kernel session))) - (ert-info ("Session is invalid when kernel is no longer alive") + (should (oref kernel session)) (jupyter-kill-kernel kernel) - (should-not (jupyter-kernel-alive-p kernel)) - (should-not (slot-boundp kernel 'session))) + (should-not (jupyter-kernel-alive-p kernel))) (ert-info ("Can we communicate?") (let ((manager (jupyter-kernel-manager :kernel kernel))) (jupyter-start-kernel manager)