Skip to content

Commit

Permalink
Merge from 5.x: PR #21186
Browse files Browse the repository at this point in the history
  • Loading branch information
ccordoba12 committed Jul 25, 2023
2 parents 05588fc + d69632e commit a2e8f54
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions spyder/app/tests/test_mainwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -6269,9 +6269,9 @@ def test_PYTHONPATH_in_consoles(main_window, qtbot, tmp_path,
assert str(new_dir) in shell.get_value("sys_path")


@flaky(max_runs=3)
@flaky(max_runs=10)
@pytest.mark.skipif(sys.platform == 'darwin', reason="Fails on Mac")
def test_clickable_ipython_tracebacks(main_window, qtbot, tmpdir):
def test_clickable_ipython_tracebacks(main_window, qtbot, tmp_path):
"""
Test that file names in IPython console tracebacks are clickable.
Expand All @@ -6282,8 +6282,11 @@ def test_clickable_ipython_tracebacks(main_window, qtbot, tmpdir):
qtbot.waitUntil(lambda: shell._prompt_html is not None,
timeout=SHELL_TIMEOUT)

# Open test file
test_file = osp.join(LOCATION, 'script.py')
# Copy test file to a temporary location to avoid modifying it.
# See spyder-ide/spyder#21186 for the details
test_file_orig = osp.join(LOCATION, 'script.py')
test_file = str(tmp_path / 'script.py')
shutil.copyfile(test_file_orig, test_file)
main_window.editor.load(test_file)
code_editor = main_window.editor.get_focus_widget()

Expand Down Expand Up @@ -6328,11 +6331,6 @@ def test_clickable_ipython_tracebacks(main_window, qtbot, tmpdir):
cursor = code_editor.textCursor()
assert cursor.blockNumber() == code_editor.blockCount() - 1

# Remove error and save file
code_editor.delete_line()
code_editor.sig_save_requested.emit()
qtbot.wait(500)


def test_recursive_debug_exception(main_window, qtbot):
"""
Expand Down Expand Up @@ -6520,7 +6518,6 @@ def test_quotes_rename_ipy(main_window, qtbot, tmpdir):
assert "error" not in control.toPlainText()
assert "fn.ipy" in control.toPlainText()
main_window.editor.close_file()



if __name__ == "__main__":
Expand Down

0 comments on commit a2e8f54

Please sign in to comment.