Skip to content

Commit

Permalink
Merge from 3.1.x: PR #4140
Browse files Browse the repository at this point in the history
  • Loading branch information
ccordoba12 committed Feb 12, 2017
2 parents 210981a + 2cb8fb0 commit b0359c2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions spyder/app/tests/test_mainwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ def main_window():
#==============================================================================
# Tests
#==============================================================================
@pytest.mark.skipif(os.name == 'nt', reason="It times out sometimes on Windows")
def test_run_code(main_window, qtbot):
"""Test all the different ways we have to run code"""
# ---- Setup ----
Expand Down
10 changes: 5 additions & 5 deletions spyder/plugins/tests/test_ipythonconsole.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#==============================================================================
# Utillity Functions
#==============================================================================
def open_client_from_connection_file(connection_info, qtbot):
def open_client_from_connection_info(connection_info, qtbot):
top_level_widgets = QApplication.topLevelWidgets()
for w in top_level_widgets:
if isinstance(w, KernelConnectionDialog):
Expand Down Expand Up @@ -59,7 +59,7 @@ def test_load_kernel_file_from_id(ipyconsole, qtbot):
connection_file = osp.basename(client.connection_file)
id_ = connection_file.split('kernel-')[-1].split('.json')[0]

QTimer.singleShot(2000, lambda: open_client_from_connection_file(
QTimer.singleShot(2000, lambda: open_client_from_connection_info(
id_, qtbot))
ipyconsole.create_client_for_kernel()

Expand All @@ -82,7 +82,7 @@ def test_load_kernel_file_from_location(ipyconsole, qtbot):
osp.basename(client.connection_file))
shutil.copy2(client.connection_file, connection_file)

QTimer.singleShot(2000, lambda: open_client_from_connection_file(
QTimer.singleShot(2000, lambda: open_client_from_connection_info(
connection_file,
qtbot))
ipyconsole.create_client_for_kernel()
Expand All @@ -101,14 +101,14 @@ def test_load_kernel_file(ipyconsole, qtbot):
client = ipyconsole.get_current_client()
qtbot.waitUntil(lambda: shell._prompt_html is not None, timeout=SHELL_TIMEOUT)

QTimer.singleShot(2000, lambda: open_client_from_connection_file(
QTimer.singleShot(2000, lambda: open_client_from_connection_info(
client.connection_file,
qtbot))
ipyconsole.create_client_for_kernel()

new_client = ipyconsole.get_clients()[1]
new_shell = new_client.shellwidget
qtbot.waitUntil(lambda: new_shell._prompt_html is not None, timeout=SHELL_TIMEOUT)
qtbot.wait(2000)
new_shell.execute('a = 10')

assert new_client.name == '1/B'
Expand Down

0 comments on commit b0359c2

Please sign in to comment.