mirror of
https://github.com/vale981/emacs-jupyter
synced 2025-03-05 07:41:37 -05:00
Add test for :display header argument in src-blocks
This commit is contained in:
parent
960372d344
commit
e0a3e09a45
1 changed files with 21 additions and 6 deletions
|
@ -1580,12 +1580,27 @@ os.path.abspath(os.getcwd())"
|
|||
(ert-deftest jupyter-org--find-mime-types ()
|
||||
:tags '(org mime)
|
||||
(ert-info ("Mimetype priority overwrite")
|
||||
(should (equal (jupyter-org--find-mime-types "text") '(:text/plain)))
|
||||
(should (equal (jupyter-org--find-mime-types "image") '(:image/png)))
|
||||
(should (equal (jupyter-org--find-mime-types "plain html") '(:text/plain :text/html)))
|
||||
(should (equal (jupyter-org--find-mime-types "org jpeg") '(:text/org :image/jpeg)))
|
||||
(should (equal (jupyter-org--find-mime-types "plain foo html bar") '(:text/plain :text/html)))
|
||||
(should (equal (jupyter-org--find-mime-types "foo bar") '()))))
|
||||
(should (equal (jupyter-org--find-mime-types "text")
|
||||
'(:text/plain)))
|
||||
(should (equal (jupyter-org--find-mime-types "image")
|
||||
'(:image/png)))
|
||||
(should (equal (jupyter-org--find-mime-types "plain html")
|
||||
'(:text/plain :text/html)))
|
||||
(should (equal (jupyter-org--find-mime-types "org jpeg")
|
||||
'(:text/org :image/jpeg)))
|
||||
(should (equal (jupyter-org--find-mime-types "plain foo html bar")
|
||||
'(:text/plain :text/html)))
|
||||
(should (equal (jupyter-org--find-mime-types "foo bar")
|
||||
'()))))
|
||||
|
||||
(ert-deftest org-babel-jupyter-:display-header-arg ()
|
||||
:tags '(org)
|
||||
(jupyter-org-test-src-block
|
||||
"\
|
||||
from IPython.display import publish_display_data
|
||||
publish_display_data({'text/plain': \"foo\", 'text/latex': \"$\\alpha$\"});"
|
||||
": foo"
|
||||
:display "plain"))
|
||||
|
||||
;; Local Variables:
|
||||
;; byte-compile-warnings: (not free-vars)
|
||||
|
|
Loading…
Add table
Reference in a new issue