test-ein-notebooklist.el 862 B

1234567891011121314151617181920212223
  1. (require 'ein-notebooklist)
  2. (defun eintest:notebooklist-make-empty (&optional url-or-port)
  3. "Make empty notebook list buffer."
  4. (ein:notebooklist-url-retrieve-callback (or url-or-port "DUMMY-URL")))
  5. (defmacro eintest:notebooklist-is-empty-context-of (func)
  6. `(ert-deftest ,(intern (format "%s--notebooklist" func)) ()
  7. (with-current-buffer (eintest:notebooklist-make-empty)
  8. (should-not (,func)))))
  9. ;; Generic getter
  10. (ert-deftest ein:get-url-or-port--notebooklist ()
  11. (with-current-buffer (eintest:notebooklist-make-empty "DUMMY-URL")
  12. (should (equal (ein:get-url-or-port) "DUMMY-URL"))))
  13. (eintest:notebooklist-is-empty-context-of ein:get-notebook)
  14. (eintest:notebooklist-is-empty-context-of ein:get-kernel)
  15. (eintest:notebooklist-is-empty-context-of ein:get-cell-at-point)
  16. (eintest:notebooklist-is-empty-context-of ein:get-traceback-data)