Skip to content

Commit 0a8b9b9

Browse files
authored
Fix selenium tests, use nbconvert 5.6 (#1408)
* Try to fix missing template file * Fix data-html being percent-encoded * Simplify, remove parameter * Use absolute path of nbconvert template * Revert "Use absolute path of nbconvert template" This reverts commit e625b30. * Use previous nbconvert version * Revert "Try to fix missing template file" This reverts commit 7eb1eca. * Revert "Fix data-html being percent-encoded" This reverts commit 6974bd6.
1 parent a9dafa4 commit 0a8b9b9

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

requirements-dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ ipykernel
1515
jupyter_client
1616
matplotlib
1717
mplleaflet
18-
nbconvert
18+
nbconvert==5.6.*
1919
nbsphinx
2020
nbval
2121
owslib

tests/selenium/test_selenium.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@ def test_notebook(filepath, driver):
4040
driver.verify_js_logs()
4141

4242

43-
def get_notebook_html(filepath_notebook, execute=True):
43+
def get_notebook_html(filepath_notebook):
4444
"""Store iframes from a notebook in html files, remove them when done."""
45-
if execute:
46-
subprocess.run([
47-
'jupyter', 'nbconvert', '--to', 'notebook', '--execute', filepath_notebook,
48-
])
49-
filepath_notebook = filepath_notebook.replace('.ipynb', '.nbconvert.ipynb')
45+
# run the notebook to make sure the output is up-to-date
46+
subprocess.run([
47+
'jupyter', 'nbconvert', '--to', 'notebook', '--execute', filepath_notebook,
48+
])
49+
filepath_notebook = filepath_notebook.replace('.ipynb', '.nbconvert.ipynb')
5050

5151
html_exporter = nbconvert.HTMLExporter()
5252
html_exporter.template_file = 'basic'

0 commit comments

Comments
 (0)