mirror of
https://github.com/vale981/emacs-ipython-notebook
synced 2025-03-06 09:31:39 -05:00
Add tests ein:get-*--notebooklist
This commit is contained in:
parent
94fa46f1ed
commit
e9d3849936
1 changed files with 26 additions and 0 deletions
26
tests/test-ein-shared-output.el
Normal file
26
tests/test-ein-shared-output.el
Normal file
|
@ -0,0 +1,26 @@
|
|||
(require 'ein-shared-output)
|
||||
|
||||
(defmacro eintest:shared-output-with-buffer (&rest body)
|
||||
(declare (indent 0))
|
||||
`(with-current-buffer (ein:shared-output-create-buffer)
|
||||
(ein:shared-output-get-or-create)
|
||||
,@body))
|
||||
|
||||
(defmacro eintest:shared-output-is-empty-context-of (func)
|
||||
`(ert-deftest ,(intern (format "%s--shared-output" func)) ()
|
||||
(eintest:shared-output-with-buffer
|
||||
(should-not (,func)))))
|
||||
|
||||
|
||||
;; Generic getter
|
||||
|
||||
(ert-deftest ein:get-cell-at-point--shared-output ()
|
||||
(eintest:shared-output-with-buffer
|
||||
(should (equal (ein:get-cell-at-point)
|
||||
(ein:shared-output-get-cell)))))
|
||||
|
||||
;; FIXME: Add tests with non-empty shared output buffer.
|
||||
(eintest:shared-output-is-empty-context-of ein:get-url-or-port)
|
||||
(eintest:shared-output-is-empty-context-of ein:get-notebook)
|
||||
(eintest:shared-output-is-empty-context-of ein:get-kernel)
|
||||
(eintest:shared-output-is-empty-context-of ein:get-traceback-data)
|
Loading…
Add table
Reference in a new issue