Skip to content

Commit 75a32e3

Browse files
committed
Guarantee that async blocks are complete before continuing testing
* test/test-helper.el (jupyter-org-test-src-block-1): Do it.
1 parent 48a57d1 commit 75a32e3

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

test/test-helper.el

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -580,9 +580,8 @@ results instead of an equality match."
580580
(save-window-excursion
581581
(org-babel-execute-src-block nil info)
582582
(when (equal (plist-get args :async) "yes")
583-
;; Add a delay to try and ensure the last request of the
584-
;; client has been completed.
585-
(sleep-for 0.2))
583+
(when-let* ((req (jupyter-org-request-at-point)))
584+
(jupyter-idle-sync req)))
586585
(goto-char (or (org-babel-where-is-src-block-result) (point)))
587586
(let ((element (org-element-context)))
588587
;; Handle empty results with just a RESULTS keyword

0 commit comments

Comments
 (0)