Skip to content

Commit

Permalink
fix ci by skipping
Browse files Browse the repository at this point in the history
  • Loading branch information
qin-yu committed Dec 17, 2024
1 parent 867a331 commit fc54201
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/widgets/test_widget_open_file.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
import os

import napari
import numpy as np
import pytest

from plantseg.io.h5 import create_h5
from plantseg.io.voxelsize import VoxelSize
from plantseg.viewer_napari.widgets.io import PathMode, widget_open_file

IN_GITHUB_ACTIONS = os.getenv("GITHUB_ACTIONS") == "true" # set to true in GitHub Actions by default to skip CUDA tests


@pytest.mark.skipif(IN_GITHUB_ACTIONS, reason="GUI tests hangs in GitHub Actions.")
def test_widget_open_file(make_napari_viewer_proxy, path_h5):
print("test_widget_open_file called")
viewer = make_napari_viewer_proxy()
Expand Down
5 changes: 5 additions & 0 deletions tests/widgets/test_widget_preprocessing.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import os

import napari
import numpy as np
import pytest
Expand All @@ -8,6 +10,8 @@
from plantseg.io.voxelsize import VoxelSize
from plantseg.viewer_napari.widgets.dataprocessing import RescaleModes, widget_rescaling

IN_GITHUB_ACTIONS = os.getenv("GITHUB_ACTIONS") == "true" # set to true in GitHub Actions by default to skip CUDA tests


def create_layer_name(name: str, suffix: str):
return f"{name}_{suffix}"
Expand Down Expand Up @@ -47,6 +51,7 @@ def widget_add_image(image: PlantSegImage) -> LayerDataTuple:
return image.to_napari_layer_tuple()


@pytest.mark.skipif(IN_GITHUB_ACTIONS, reason="GUI tests hangs in GitHub Actions.")
class TestWidgetRescaling:
def test_rescaling_from_factor(self, make_napari_viewer_proxy, sample_image):
viewer = make_napari_viewer_proxy()
Expand Down

0 comments on commit fc54201

Please sign in to comment.