Skip to content

Commit

Permalink
Merge pull request #1015 from MSeal/fix_random_notebook_test_failure
Browse files Browse the repository at this point in the history
Removed newlines from clear notebook test. Refactored test_run_notebooks
  • Loading branch information
MSeal authored May 6, 2019
2 parents 6372b7f + 1db7f23 commit b625b10
Show file tree
Hide file tree
Showing 2 changed files with 266 additions and 248 deletions.
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

0 comments on commit b625b10

Please sign in to comment.