From 633385bfd9ee4efa61029c92467b46ad98623aea Mon Sep 17 00:00:00 2001 From: Feda Curic Date: Mon, 18 Sep 2023 13:57:13 +0200 Subject: [PATCH] Turn on gui tests for mac Only test Python 3.10 to save time. Co-authored by: Eivind --- .github/workflows/build.yml | 9 +-------- tests/conftest.py | 5 ++--- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 87931207b9f..b5ec97b714f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -123,16 +123,9 @@ jobs: strategy: fail-fast: false matrix: - python-version: [ '3.8', '3.9', '3.10', '3.11' ] + python-version: [ '3.10' ] os: [ macos-latest ] test-type: [ 'integration-tests', 'unit-tests', 'gui-test' ] - exclude: - - os: macos-latest - python-version: '3.9' - - os: macos-latest - test-type: 'gui-test' - - os: macos-latest - python-version: '3.10' uses: ./.github/workflows/test_ert.yml with: os: ${{ matrix.os }} diff --git a/tests/conftest.py b/tests/conftest.py index e3e83d47e3b..7c8ace12e80 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -3,6 +3,7 @@ import pkgutil import resource import shutil +import sys from argparse import ArgumentParser from os.path import dirname from typing import TYPE_CHECKING, cast @@ -180,7 +181,7 @@ def mock_connect(monkeypatch): @pytest.fixture(scope="session", autouse=True) def hide_window(request): - if request.config.getoption("--show-gui"): + if sys.platform == "darwin" or request.config.getoption("--show-gui"): yield return @@ -214,8 +215,6 @@ def _qt_excepthook(monkeypatch): """ - import sys - from qtpy.QtWidgets import QApplication next_excepthook = sys.excepthook