Skip to content

Commit 7cc2a44

Browse files
committed
Skip in linux - testing.
1 parent 22edb17 commit 7cc2a44

File tree

2 files changed

+5
-20
lines changed

2 files changed

+5
-20
lines changed

Diff for: spyder/app/tests/test_mainwindow.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
from spyder.app.cli_options import get_options
2626
from spyder.app.mainwindow import initialize, run_spyder
27-
from spyder.utils.tests import close_save_message_box
27+
from spyder.utils.tests import close_message_box
2828

2929
#==============================================================================
3030
# Constants
@@ -82,9 +82,9 @@ def close_widget():
8282
# Tests
8383
#==============================================================================
8484
@flaky(max_runs=10)
85-
#@pytest.mark.skipif(os.name != 'nt' and PYQT5,
86-
# reason="It segfaults too frequently in linux "
87-
# "with PyQt5")
85+
@pytest.mark.skipif(os.name != 'nt' and PYQT5,
86+
reason="It segfaults too frequently in linux "
87+
"with PyQt5")#FIXME Probably caused by the save message of the file
8888
def test_calltip(main_window, qtbot):
8989
"""Hide the calltip in the editor when a matching ')' is found."""
9090
# Load test file
@@ -110,7 +110,7 @@ def test_calltip(main_window, qtbot):
110110
qtbot.keyPress(code_editor, Qt.Key_ParenRight, delay=1000)
111111
qtbot.keyPress(code_editor, Qt.Key_Enter, delay=1000)
112112

113-
QTimer.singleShot(1000, lambda: close_save_message_box(qtbot))
113+
QTimer.singleShot(1000, lambda: close_message_box(qtbot))
114114

115115

116116
@flaky(max_runs=10)

Diff for: spyder/utils/tests.py

-15
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,3 @@ def close_message_box(qtbot):
2222
for w in top_level_widgets:
2323
if isinstance(w, QMessageBox):
2424
qtbot.keyClick(w, Qt.Key_Enter)
25-
26-
def close_save_message_box(qtbot):
27-
"""
28-
Closes Save QMessageBox's that can appear when testing.
29-
30-
You can use this with QTimer to close a QMessageBox.
31-
Before calling anything that may show a QMessageBox call:
32-
QTimer.singleShot(1000, lambda: close_save_message_box(qtbot))
33-
"""
34-
top_level_widgets = QApplication.topLevelWidgets()
35-
for w in top_level_widgets:
36-
if isinstance(w, QMessageBox):
37-
qtbot.keyClick(w, Qt.Key_Right)
38-
qtbot.keyClick(w, Qt.Key_Enter)
39-

0 commit comments

Comments
 (0)