test-ein-pytools.el 867 B

12345678910111213141516171819202122232425262728
  1. (require 'ert)
  2. (when load-file-name
  3. (add-to-list 'load-path
  4. (concat (file-name-directory load-file-name) "mocker")))
  5. (require 'mocker)
  6. (require 'ein-pytools)
  7. (require 'ein-testing-kernel)
  8. (ert-deftest ein:pytools-finish-tooltip ()
  9. (ein:testing-kernel-construct-help-string-loop
  10. (lambda (content result)
  11. (if result
  12. (mocker-let
  13. ((featurep
  14. (feature)
  15. ((:input '(pos-tip) :output t)))
  16. (pos-tip-show
  17. (string &optional tip-color pos window timeout)
  18. ((:input (list result 'ein:pos-tip-face nil nil 0)))))
  19. (let ((window-system t))
  20. (ein:pytools-finish-tooltip '-not-used- content '-not-used-)))
  21. (mocker-let
  22. ((featurep (feature) ()))
  23. (ein:pytools-finish-tooltip '-not-used- content '-not-used-))))))