From 7ff49f0e15111e93beae13acb4f898752d822cd0 Mon Sep 17 00:00:00 2001 From: Shrivaths Shyam Date: Thu, 11 Jan 2024 01:48:06 -0800 Subject: [PATCH] misplaced skip --- tests/gui/test_app.py | 11 ++++++----- tests/gui/test_grid_system.py | 5 +++-- tests/gui/widgets/test_docks.py | 13 +++++++------ 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/tests/gui/test_app.py b/tests/gui/test_app.py index a8afaa5e5..5a99b9cd2 100644 --- a/tests/gui/test_app.py +++ b/tests/gui/test_app.py @@ -1,10 +1,5 @@ import pytest import sys -from qtpy.QtWidgets import QApplication - -from sleap.gui.app import MainWindow -from sleap.gui.commands import * -from sleap.gui.dialogs.bulletin import BulletinWorker # Skip the test for MacOS due to QWebEngineView ImportError # TODO: Need to resolve the ImportError @@ -12,6 +7,12 @@ pytestmark = pytest.mark.skip(reason="ImportError for MacOS") pytest.skip(reason="Skipping tests and import on macOS", allow_module_level=True) +from qtpy.QtWidgets import QApplication + +from sleap.gui.app import MainWindow +from sleap.gui.commands import * +from sleap.gui.dialogs.bulletin import BulletinWorker + def test_app_workflow( qtbot, centered_pair_vid, small_robot_mp4_vid, min_tracks_2node_labels: Labels diff --git a/tests/gui/test_grid_system.py b/tests/gui/test_grid_system.py index 7517b2f80..3d22b3ec8 100644 --- a/tests/gui/test_grid_system.py +++ b/tests/gui/test_grid_system.py @@ -1,8 +1,6 @@ import numpy as np import pytest import sys -from sleap.gui.app import MainWindow -from sleap.gui.commands import * # Skip the test for MacOS due to QWebEngineView ImportError # TODO: Need to resolve the ImportError @@ -10,6 +8,9 @@ pytestmark = pytest.mark.skip(reason="ImportError for MacOS") pytest.skip(reason="Skipping tests and import on macOS", allow_module_level=True) +from sleap.gui.app import MainWindow +from sleap.gui.commands import * + def test_grid_system_midpoint_gui(qtbot, midpoint_grid_labels): app = MainWindow(no_usage_data=True) diff --git a/tests/gui/widgets/test_docks.py b/tests/gui/widgets/test_docks.py index 196fffe88..3cb67229f 100644 --- a/tests/gui/widgets/test_docks.py +++ b/tests/gui/widgets/test_docks.py @@ -3,6 +3,13 @@ from pathlib import Path import pytest import sys + +# Skip the test for MacOS due to QWebEngineView ImportError +# TODO: Need to resolve the ImportError +if sys.platform == "darwin": + pytestmark = pytest.mark.skip(reason="ImportError for MacOS") + pytest.skip(reason="Skipping tests and import on macOS", allow_module_level=True) + from sleap import Labels, Video from sleap.gui.app import MainWindow from sleap.gui.commands import OpenSkeleton @@ -13,12 +20,6 @@ SkeletonDock, ) -# Skip the test for MacOS due to QWebEngineView ImportError -# TODO: Need to resolve the ImportError -if sys.platform == "darwin": - pytestmark = pytest.mark.skip(reason="ImportError for MacOS") - pytest.skip(reason="Skipping tests and import on macOS", allow_module_level=True) - def test_videos_dock( qtbot,