diff --git a/spyder/plugins/editor/widgets/codeeditor/tests/test_codeeditor.py b/spyder/plugins/editor/widgets/codeeditor/tests/test_codeeditor.py index 0d6ca09635f..8e0a143001f 100644 --- a/spyder/plugins/editor/widgets/codeeditor/tests/test_codeeditor.py +++ b/spyder/plugins/editor/widgets/codeeditor/tests/test_codeeditor.py @@ -10,7 +10,7 @@ from unittest.mock import MagicMock # Third party imports -from qtpy import QT_VERSION +from qtpy import QT_VERSION, PYQT6 from qtpy.QtCore import Qt, QEvent, QPointF from qtpy.QtGui import QTextCursor, QMouseEvent from qtpy.QtWidgets import QApplication, QMainWindow, QTextEdit @@ -438,6 +438,7 @@ def test_editor_delete_selection(codeeditor, qtbot): @pytest.mark.skipif(QT_VERSION.startswith('5.15'), reason='Fixed on Qt 5.15') +@pytest.mark.skipif(PYQT6, reason="Fails with PyQt6") def test_qtbug35861(qtbot): """This test will detect if upstream QTBUG-35861 is fixed. If that happens, then the workarounds for spyder-ide/spyder#12663 diff --git a/spyder/plugins/editor/widgets/codeeditor/tests/test_decorations.py b/spyder/plugins/editor/widgets/codeeditor/tests/test_decorations.py index 4af4407dafe..b586edb0f6a 100644 --- a/spyder/plugins/editor/widgets/codeeditor/tests/test_decorations.py +++ b/spyder/plugins/editor/widgets/codeeditor/tests/test_decorations.py @@ -13,6 +13,7 @@ from flaky import flaky import pytest +from qtpy import PYTQ6 from qtpy.QtCore import Qt from qtpy.QtGui import QFont, QTextCursor @@ -93,6 +94,7 @@ def test_decorations(codeeditor, qtbot): @flaky(max_runs=10) +@pytest.mark.skipif(PYQT6, reason="Fails with PyQt6") def test_update_decorations_when_scrolling(qtbot): """ Test how many calls we're doing to update decorations when diff --git a/spyder/plugins/editor/widgets/codeeditor/tests/test_goto.py b/spyder/plugins/editor/widgets/codeeditor/tests/test_goto.py index aae5e9d0f14..5356060102b 100644 --- a/spyder/plugins/editor/widgets/codeeditor/tests/test_goto.py +++ b/spyder/plugins/editor/widgets/codeeditor/tests/test_goto.py @@ -10,6 +10,7 @@ import tempfile # Third party imports +from qtpy import PYQT6 from qtpy.QtCore import Qt, QPoint, QTimer from qtpy.QtGui import QDesktopServices, QTextCursor from qtpy.QtWidgets import QMessageBox @@ -28,6 +29,7 @@ TEST_FILE_REL = 'conftest.py' +@pytest.mark.skipif(PYQT6, reason="Fails with PyQt6") @pytest.mark.parametrize('params', [ # Parameter, expected output 1, full file path, expected output 2 # ---------------------------------------------------------------- @@ -118,6 +120,7 @@ def test_goto_uri(qtbot, codeeditor, mocker, params): assert expected_output_2 == output_2 +@pytest.mark.skipif(PYQT6, reason="Fails with PyQt6") def test_goto_uri_project_root_path(qtbot, codeeditor, mocker, tmpdir): """Test that the uri search is working correctly.""" code_editor = codeeditor diff --git a/spyder/plugins/editor/widgets/editorstack/tests/test_save.py b/spyder/plugins/editor/widgets/editorstack/tests/test_save.py index 8315ee6a8e8..8face7b3c2d 100644 --- a/spyder/plugins/editor/widgets/editorstack/tests/test_save.py +++ b/spyder/plugins/editor/widgets/editorstack/tests/test_save.py @@ -17,6 +17,7 @@ # Third party imports from flaky import flaky import pytest +from qtpy import PYQT6 from qtpy.QtCore import Qt # Local imports @@ -211,6 +212,7 @@ def test_save(editor_bot, mocker): editor_stack.file_saved = save_file_saved +@pytest.mark.skipif(PYQT6, reason="Fails with PyQt6") def test_file_saved_in_other_editorstack(editor_splitter_layout_bot): """Test EditorStack.file_saved_in_other_editorstack().""" es = editor_splitter_layout_bot diff --git a/spyder/plugins/ipythonconsole/tests/test_ipythonconsole.py b/spyder/plugins/ipythonconsole/tests/test_ipythonconsole.py index 13244447985..779165c350c 100644 --- a/spyder/plugins/ipythonconsole/tests/test_ipythonconsole.py +++ b/spyder/plugins/ipythonconsole/tests/test_ipythonconsole.py @@ -1974,6 +1974,7 @@ def test_pdb_comprehension_namespace(ipyconsole, qtbot, tmpdir): @flaky(max_runs=10) @pytest.mark.auto_backend +@pytest.mark.skipif(PYQT6, reason="Fails with PyQt6") def test_restart_interactive_backend(ipyconsole, qtbot): """ Test that we ask for a restart or not after switching to different diff --git a/spyder/plugins/run/tests/test_run.py b/spyder/plugins/run/tests/test_run.py index 464db075b88..17e7878d881 100644 --- a/spyder/plugins/run/tests/test_run.py +++ b/spyder/plugins/run/tests/test_run.py @@ -18,6 +18,7 @@ # Third-part imports import pytest +from qtpy import PYQT6 from qtpy.QtCore import Signal, Qt from qtpy.QtWidgets import ( QAction, QWidget, QCheckBox, QLineEdit, QVBoxLayout, QHBoxLayout, QLabel) @@ -360,6 +361,7 @@ def run_mock(qtbot, tmpdir): return run, mock_main_window, temp_dir +@pytest.mark.skipif(PYQT6, reason="Fails with PyQt6") def test_run_plugin(qtbot, run_mock): run, main_window, temp_cwd = run_mock