Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed newlines from clear notebook test. Refactored test_run_notebooks #1015

Merged
merged 3 commits into from
May 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 31 additions & 16 deletions nbconvert/preprocessors/tests/files/Clear Output.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,17 @@
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"from __future__ import print_function\n",
"from IPython.display import clear_output"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"name": "stdout",
Expand Down Expand Up @@ -51,12 +48,12 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Hello world\n"
"Hello world"
]
}
],
"source": [
"print(\"Hello world\")\n",
"print(\"Hello world\", end='')\n",
"clear_output(wait=True) # no output after this"
]
},
Expand All @@ -69,14 +66,14 @@
"name": "stdout",
"output_type": "stream",
"text": [
"world\n"
"world"
]
}
],
"source": [
"print(\"Hello\")\n",
"print(\"Hello\", end='')\n",
"clear_output(wait=True) # here we have new output after wait=True\n",
"print(\"world\")"
"print(\"world\", end='')"
]
},
{
Expand Down Expand Up @@ -165,14 +162,14 @@
"name": "stdout",
"output_type": "stream",
"text": [
"world\n"
"world"
]
}
],
"source": [
"handle4 = display(\"Hello\", display_id=\"id4\")\n",
"clear_output(wait=True)\n",
"print('world')"
"print('world', end='')"
]
},
{
Expand All @@ -185,7 +182,25 @@
]
}
],
"metadata": {},
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.7"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
"nbformat_minor": 1
}
Loading