Skip to content

Commit e8db652

Browse files
committed
Add some clarity in test conditions on failure
* jupyter-test (jupyter-hb-channel): Add some `ert-info` calls.
1 parent 3fb91a6 commit e8db652

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

test/jupyter-test.el

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -517,25 +517,28 @@
517517
(died-cb-called nil)
518518
(jupyter-hb-max-failures 1))
519519
(oset channel time-to-dead 0.1)
520-
(should-not (jupyter-alive-p channel))
521-
(should-not (jupyter-hb-beating-p channel))
522-
(should (oref channel paused))
520+
(ert-info ("Initial conditions")
521+
(should-not (jupyter-alive-p channel))
522+
(should-not (jupyter-hb-beating-p channel))
523+
(should (oref channel paused)))
523524
(oset channel beating t)
524525
(jupyter-start channel)
525526
(jupyter-hb-on-kernel-dead channel (lambda () (setq died-cb-called t)))
526-
(should (jupyter-alive-p channel))
527-
;; `jupyter-hb-unpause' needs to explicitly called
528-
(should (oref channel paused))
527+
(ert-info ("After channel start")
528+
(should (jupyter-alive-p channel))
529+
;; `jupyter-hb-unpause' needs to explicitly called
530+
(should (oref channel paused)))
529531
(jupyter-hb-unpause channel)
530532
(sleep-for 0.2)
531533
;; It seems the timers are run after returning from the first `sleep-for'
532534
;; call.
533535
(sleep-for 0.1)
534-
(should (oref channel paused))
535-
(should-not (oref channel beating))
536-
(should died-cb-called)
537-
(should (jupyter-alive-p channel))
538-
(should-not (jupyter-hb-beating-p channel))))
536+
(ert-info ("After unpausing and waiting")
537+
(should (oref channel paused))
538+
(should-not (oref channel beating))
539+
(should died-cb-called)
540+
(should (jupyter-alive-p channel))
541+
(should-not (jupyter-hb-beating-p channel)))))
539542

540543
;;; GC
541544

0 commit comments

Comments
 (0)