Skip to content

Commit

Permalink
Merge from 3.x: PR #7860
Browse files Browse the repository at this point in the history
Fixes #7856
  • Loading branch information
ccordoba12 committed Sep 8, 2018
2 parents 6712384 + 52cb89f commit 65bddd3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion spyder/app/tests/test_mainwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
QToolTip)
from qtpy.QtWebEngineWidgets import WEBENGINE
from matplotlib.testing.compare import compare_images
import nbconvert

# Local imports
from spyder import __trouble_url__, __project_url__
Expand Down Expand Up @@ -797,7 +798,12 @@ def test_open_notebooks_from_project_explorer(main_window, qtbot, tmpdir):

# Assert its contents are the expected ones
file_text = editorstack.get_current_editor().toPlainText()
assert file_text == '\n# coding: utf-8\n\n# In[1]:\n\n\n1 + 1\n\n\n'
if nbconvert.__version__ >= '5.4.0':
expected_text = ('#!/usr/bin/env python\n# coding: utf-8\n\n# In[1]:'
'\n\n\n1 + 1\n\n\n# In[ ]:\n\n\n\n\n\n')
else:
expected_text = '\n# coding: utf-8\n\n# In[1]:\n\n\n1 + 1\n\n\n'
assert file_text == expected_text

# Close project
projects.close_project()
Expand Down

0 comments on commit 65bddd3

Please sign in to comment.