diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index b295b9b..b726147 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -18,15 +18,6 @@ jobs: with: python-version: ${{ matrix.python-version }} - - name: Install system dependencies - run: | - sudo apt-get update - sudo apt-get install -y libgl1-mesa-glx libglfw3 libglu1-mesa-dev freeglut3-dev mesa-utils - - - name: Verify OpenGL installation - run: | - glxinfo | grep "OpenGL" - - name: Install Poetry run: | python -m pip install --upgrade pip @@ -36,10 +27,6 @@ jobs: run: | poetry install --with dev - - name: Install OpenGL and GLFW Python dependencies - run: | - poetry run pip install PyOpenGL glfw - - name: Run tests run: | poetry run pytest diff --git a/tests/test_slm.py b/tests/test_slm.py index 7c6344b..85ec3c8 100644 --- a/tests/test_slm.py +++ b/tests/test_slm.py @@ -2,9 +2,14 @@ import astropy.units as u import cv2 +import pytest + +pytest.importorskip("glfw", reason="GLFW is required for the ScanningMicroscope module") +pytest.importorskip("OpenGL.GL", reason="PyOpenGL is required for OpenGL rendering") + import glfw import numpy as np # for debugging -import pytest + from ..openwfs.devices.slm import SLM, Patch, geometry from ..openwfs.utilities import Transform