Include execution output in ipynb test.
This commit is contained in:
parent
4810f300e1
commit
e405d7b532
4 changed files with 29 additions and 8 deletions
|
@ -192,9 +192,11 @@ tests pandocPath =
|
|||
"org-select-tags.org" "org-select-tags.native"
|
||||
]
|
||||
, testGroup "ipynb"
|
||||
[ test' "reader" ["-f", "ipynb", "-t", "native", "-s"]
|
||||
[ test' "reader" ["-f", "ipynb-raw_html-raw_tex+raw_attribute",
|
||||
"-t", "native", "-s"]
|
||||
"ipynb/simple.ipynb" "ipynb/simple.out.native"
|
||||
, test' "writer" ["-f", "native", "-t", "ipynb", "-s"]
|
||||
, test' "writer" ["-f", "native", "-t",
|
||||
"ipynb-raw_html-raw_tex+raw_attribute", "-s"]
|
||||
"ipynb/simple.in.native" "ipynb/simple.ipynb"
|
||||
]
|
||||
]
|
||||
|
|
|
@ -6,8 +6,10 @@ Pandoc (Meta {unMeta = fromList [("jupyter",MetaMap (fromList [("nbformat",MetaI
|
|||
[CodeBlock ("",["python"],[]) "print(\"hello\")"]
|
||||
,Div ("",["cell","markdown"],[])
|
||||
[Header 2 ("pyout",[],[]) [Str "Pyout"]]
|
||||
,Div ("",["cell","code"],[])
|
||||
[CodeBlock ("",["python"],[]) "from IPython.display import HTML\nHTML(\"\"\"\n<script>\nconsole.log(\"hello\");\n</script>\n<b>HTML</b>\n\"\"\")"]
|
||||
,Div ("",["cell","code"],[("execution_count","2")])
|
||||
[CodeBlock ("",["python"],[]) "from IPython.display import HTML\nHTML(\"\"\"\n<script>\nconsole.log(\"hello\");\n</script>\n<b>HTML</b>\n\"\"\")"
|
||||
,Div ("",["output","execute_result"],[("execution_count","2")])
|
||||
[RawBlock (Format "html") "<script>\nconsole.log(\"hello\");\n</script>\n<b>HTML</b>\nhello"]]
|
||||
,Div ("",["cell","markdown"],[("tags","[\"foo\",\"bar\"]")])
|
||||
[Header 2 ("image",[],[]) [Str "Image"]
|
||||
,Para [Str "This",Space,Str "image",Space,Image ("",[],[]) [Str "the",Space,Str "moon"] ("lalune.jpg",""),Space,Str "will",Space,Str "be",Space,Str "included",Space,Str "as",Space,Str "a",Space,Str "cell",SoftBreak,Str "attachment."]]]
|
||||
|
|
|
@ -30,9 +30,24 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"execution_count": 2,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"outputs": [
|
||||
{
|
||||
"output_type": "execute_result",
|
||||
"execution_count": 2,
|
||||
"metadata": {},
|
||||
"data": {
|
||||
"text/html": [
|
||||
"<script>\n",
|
||||
"console.log(\"hello\");\n",
|
||||
"</script>\n",
|
||||
"<b>HTML</b>\n",
|
||||
"hello"
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"from IPython.display import HTML\n",
|
||||
"HTML(\"\"\"\n",
|
||||
|
|
|
@ -6,8 +6,10 @@ Pandoc (Meta {unMeta = fromList [("jupyter",MetaMap (fromList [("nbformat",MetaS
|
|||
[CodeBlock ("",["python"],[]) "print(\"hello\")"]
|
||||
,Div ("",["cell","markdown"],[])
|
||||
[Header 2 ("pyout",[],[]) [Str "Pyout"]]
|
||||
,Div ("",["cell","code"],[])
|
||||
[CodeBlock ("",["python"],[]) "from IPython.display import HTML\nHTML(\"\"\"\n<script>\nconsole.log(\"hello\");\n</script>\n<b>HTML</b>\n\"\"\")"]
|
||||
,Div ("",["cell","code"],[("execution_count","2")])
|
||||
[CodeBlock ("",["python"],[]) "from IPython.display import HTML\nHTML(\"\"\"\n<script>\nconsole.log(\"hello\");\n</script>\n<b>HTML</b>\n\"\"\")"
|
||||
,Div ("",["output","execute_result"],[("execution_count","2")])
|
||||
[RawBlock (Format "html") "<script>\nconsole.log(\"hello\");\n</script>\n<b>HTML</b>\nhello"]]
|
||||
,Div ("",["cell","markdown"],[("tags","[\"foo\",\"bar\"]")])
|
||||
[Header 2 ("image",[],[]) [Str "Image"]
|
||||
,Para [Str "This",Space,Str "image",Space,Image ("",[],[]) [Str "the",Space,Str "moon"] ("lalune.jpg",""),Space,Str "will",Space,Str "be",Space,Str "included",Space,Str "as",Space,Str "a",Space,Str "cell",SoftBreak,Str "attachment."]]]
|
||||
|
|
Loading…
Reference in a new issue