From e0a3e09a457eaa3a0cd686e2b3b14e45e993dcf2 Mon Sep 17 00:00:00 2001 From: Nathaniel Nicandro Date: Fri, 22 Feb 2019 08:32:00 -0600 Subject: [PATCH] Add test for :display header argument in src-blocks --- test/jupyter-test.el | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/test/jupyter-test.el b/test/jupyter-test.el index 11a4a4a..e8e58f8 100644 --- a/test/jupyter-test.el +++ b/test/jupyter-test.el @@ -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)