Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR: Fix test_shell_execution for macOS #20548

Merged
merged 1 commit into from
Feb 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion spyder/app/tests/bash_example.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
set -exou
set -exo

TEMP_DIR=$1

Expand Down
9 changes: 4 additions & 5 deletions spyder/app/tests/test_mainwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def ns_fun(main_window, qtbot):
and shell._prompt_html is not None
),
timeout=SHELL_TIMEOUT)

# Count initial objects
# Only one of each should be present, but because of many leaks,
# this is most likely not the case. Here only closing is tested
Expand All @@ -159,15 +159,15 @@ def ns_fun(main_window, qtbot):
for o in objects:
if type(o).__name__ == "ShellWidget":
n_shell_init += 1

# Open a second file and console
main_window.editor.new()
main_window.ipyconsole.create_new_client()
# Do something interesting in the new window
code_editor = main_window.editor.get_focus_widget()
# Show an error in the editor
code_editor.set_text("aaa")

shell = main_window.ipyconsole.get_current_shellwidget()
qtbot.waitUntil(
lambda: (
Expand All @@ -177,7 +177,7 @@ def ns_fun(main_window, qtbot):
timeout=SHELL_TIMEOUT)
with qtbot.waitSignal(shell.executed):
shell.execute("%debug print()")

# Close all files and consoles
main_window.editor.close_all_files()
main_window.ipyconsole.restart()
Expand Down Expand Up @@ -863,7 +863,6 @@ def test_dedicated_consoles(main_window, qtbot):

@flaky(max_runs=3)
@pytest.mark.order(after="test_dedicated_consoles")
@pytest.mark.skipif(sys.platform == 'darwin', reason='Fails on Mac')
def test_shell_execution(main_window, qtbot, tmpdir):
"""Test that bash/batch files can be executed."""
ext = 'sh'
Expand Down