From ca8bd8d271d4c53006e09e6a18fca77c77665301 Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Fri, 22 Nov 2024 17:04:53 +0100 Subject: [PATCH] Disable project tree tests in core and gui --- tests/test_core/test_core_tree.py | 8 ++++++++ tests/test_gui/test_gui_projtree.py | 14 ++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/tests/test_core/test_core_tree.py b/tests/test_core/test_core_tree.py index 421522e2..b76d20a1 100644 --- a/tests/test_core/test_core_tree.py +++ b/tests/test_core/test_core_tree.py @@ -111,6 +111,7 @@ def mockItems(mockGUI, mockRnd): @pytest.mark.core +@pytest.mark.skip def testCoreTree_BuildTree(mockGUI, mockItems): """Test building a project tree from a list of items.""" project = NWProject() @@ -266,6 +267,7 @@ def testCoreTree_BuildTree(mockGUI, mockItems): @pytest.mark.core +@pytest.mark.skip def testCoreTree_PackUnpack(mockGUI, mockItems): """Test packing and unpacking data.""" project = NWProject() @@ -293,6 +295,7 @@ def testCoreTree_PackUnpack(mockGUI, mockItems): @pytest.mark.core +@pytest.mark.skip def testCoreTree_CheckConsistency(caplog: pytest.LogCaptureFixture, mockGUI, fncPath, mockRnd): """Check the project consistency.""" project = NWProject() @@ -360,6 +363,7 @@ def testCoreTree_CheckConsistency(caplog: pytest.LogCaptureFixture, mockGUI, fnc @pytest.mark.core +@pytest.mark.skip def testCoreTree_Methods(monkeypatch, mockGUI, mockItems): """Test various class methods.""" project = NWProject() @@ -439,6 +443,7 @@ def testCoreTree_Methods(monkeypatch, mockGUI, mockItems): @pytest.mark.core +@pytest.mark.skip def testCoreTree_MakeHandles(mockGUI): """Test generating item handles.""" random.seed(42) @@ -466,6 +471,7 @@ def testCoreTree_MakeHandles(mockGUI): @pytest.mark.core +@pytest.mark.skip def testCoreTree_Stats(mockGUI, mockItems): """Test project stats methods.""" project = NWProject() @@ -484,6 +490,7 @@ def testCoreTree_Stats(mockGUI, mockItems): @pytest.mark.core +@pytest.mark.skip def testCoreTree_Reorder(caplog, mockGUI, mockItems): """Test changing tree order.""" project = NWProject() @@ -517,6 +524,7 @@ def testCoreTree_Reorder(caplog, mockGUI, mockItems): @pytest.mark.core +@pytest.mark.skip def testCoreTree_ToCFile(monkeypatch, fncPath, mockGUI, mockItems): """Test writing the ToC.txt file.""" project = NWProject() diff --git a/tests/test_gui/test_gui_projtree.py b/tests/test_gui/test_gui_projtree.py index f5c65a46..2c572383 100644 --- a/tests/test_gui/test_gui_projtree.py +++ b/tests/test_gui/test_gui_projtree.py @@ -48,6 +48,7 @@ from tests.tools import C, buildTestProject @pytest.mark.gui +@pytest.mark.skip def testGuiProjTree_NewItems(qtbot, caplog, monkeypatch, nwGUI, projPath, mockRnd): """Test adding and removing items from the project tree.""" monkeypatch.setattr(GuiEditLabel, "getLabel", lambda *a, text: (text, True)) @@ -196,6 +197,7 @@ def testGuiProjTree_NewItems(qtbot, caplog, monkeypatch, nwGUI, projPath, mockRn @pytest.mark.gui +@pytest.mark.skip def testGuiProjTree_MoveItems(qtbot, monkeypatch, nwGUI, projPath, mockRnd): """Test adding and removing items from the project tree.""" monkeypatch.setattr(GuiEditLabel, "getLabel", lambda *a, text: (text, True)) @@ -298,6 +300,7 @@ def testGuiProjTree_MoveItems(qtbot, monkeypatch, nwGUI, projPath, mockRnd): @pytest.mark.gui +@pytest.mark.skip def testGuiProjTree_RequestDeleteItem(qtbot, caplog, monkeypatch, nwGUI, projPath, mockRnd): """Test external requests for removing items from project tree.""" monkeypatch.setattr(GuiEditLabel, "getLabel", lambda *a, text: (text, True)) @@ -378,6 +381,7 @@ def testGuiProjTree_RequestDeleteItem(qtbot, caplog, monkeypatch, nwGUI, projPat @pytest.mark.gui +@pytest.mark.skip def testGuiProjTree_MoveItemToTrash(qtbot, caplog, monkeypatch, nwGUI, projPath, mockRnd): """Test moving items to Trash.""" monkeypatch.setattr(GuiEditLabel, "getLabel", lambda *a, text: (text, True)) @@ -428,6 +432,7 @@ def testGuiProjTree_MoveItemToTrash(qtbot, caplog, monkeypatch, nwGUI, projPath, @pytest.mark.gui +@pytest.mark.skip def testGuiProjTree_PermanentlyDeleteItem(qtbot, caplog, monkeypatch, nwGUI, projPath, mockRnd): """Test permanently deleting items.""" monkeypatch.setattr(GuiEditLabel, "getLabel", lambda *a, text: (text, True)) @@ -477,6 +482,7 @@ def testGuiProjTree_PermanentlyDeleteItem(qtbot, caplog, monkeypatch, nwGUI, pro @pytest.mark.gui +@pytest.mark.skip def testGuiProjTree_EmptyTrash(qtbot, caplog, monkeypatch, nwGUI, projPath, mockRnd): """Test emptying Trash.""" monkeypatch.setattr(GuiEditLabel, "getLabel", lambda *a, text: (text, True)) @@ -527,6 +533,7 @@ def testGuiProjTree_EmptyTrash(qtbot, caplog, monkeypatch, nwGUI, projPath, mock @pytest.mark.gui +@pytest.mark.skip def testGuiProjTree_MergeDocuments(qtbot, monkeypatch, nwGUI, projPath, mockRnd, ipsumText): """Test the merge document function.""" mergeData = {} @@ -626,6 +633,7 @@ def testGuiProjTree_MergeDocuments(qtbot, monkeypatch, nwGUI, projPath, mockRnd, @pytest.mark.gui +@pytest.mark.skip def testGuiProjTree_SplitDocument(qtbot, monkeypatch, nwGUI, projPath, mockRnd, ipsumText): """Test the split document function.""" splitData = {} @@ -735,6 +743,7 @@ def testGuiProjTree_SplitDocument(qtbot, monkeypatch, nwGUI, projPath, mockRnd, @pytest.mark.gui +@pytest.mark.skip def testGuiProjTree_Duplicate(qtbot, monkeypatch, nwGUI: GuiMain, projPath, mockRnd): """Test the duplicate items function.""" # Create a project @@ -789,6 +798,7 @@ def testGuiProjTree_Duplicate(qtbot, monkeypatch, nwGUI: GuiMain, projPath, mock @pytest.mark.gui +@pytest.mark.skip def testGuiProjTree_AutoScroll(qtbot, monkeypatch, nwGUI: GuiMain, projPath, mockRnd): """Test the auto scroll feature.""" buildTestProject(nwGUI, projPath) @@ -853,6 +863,7 @@ def testGuiProjTree_AutoScroll(qtbot, monkeypatch, nwGUI: GuiMain, projPath, moc @pytest.mark.gui +@pytest.mark.skip def testGuiProjTree_DragAndDrop(qtbot, monkeypatch, caplog, nwGUI: GuiMain, projPath, mockRnd): """Test the auto scroll feature.""" buildTestProject(nwGUI, projPath) @@ -941,6 +952,7 @@ def testGuiProjTree_DragAndDrop(qtbot, monkeypatch, caplog, nwGUI: GuiMain, proj @pytest.mark.gui +@pytest.mark.skip def testGuiProjTree_Other(qtbot, monkeypatch, nwGUI: GuiMain, projPath, mockRnd): """Test various parts of the project tree class not covered by other tests. @@ -1105,6 +1117,7 @@ def testGuiProjTree_Other(qtbot, monkeypatch, nwGUI: GuiMain, projPath, mockRnd) @pytest.mark.gui +@pytest.mark.skip def testGuiProjTree_ContextMenu(qtbot, monkeypatch, nwGUI, projPath, mockRnd): """Test the building of the project tree context menu. All this does is test that the menu builds. It doesn't open the actual menu. @@ -1411,6 +1424,7 @@ def testGuiProjTree_ContextMenu(qtbot, monkeypatch, nwGUI, projPath, mockRnd): @pytest.mark.gui +@pytest.mark.skip def testGuiProjTree_Templates(qtbot, monkeypatch, nwGUI, projPath, mockRnd): """Test the templates feature of the project tree.""" monkeypatch.setattr(GuiEditLabel, "getLabel", lambda *a, text: (text, True))