From 24e04740aa4da240ad8510f0228e88c231ef2529 Mon Sep 17 00:00:00 2001 From: Jun Komoda <45822440+junkmd@users.noreply.github.com> Date: Sat, 1 Jun 2024 01:49:45 +0000 Subject: [PATCH] update --- .github/workflows/autotest.yml | 3 +++ comtypes/test/test_dispifc_records.py | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/autotest.yml b/.github/workflows/autotest.yml index 6ed75ac4..e4a83f8e 100644 --- a/.github/workflows/autotest.yml +++ b/.github/workflows/autotest.yml @@ -4,6 +4,9 @@ on: push: branches: [main] +env: + REQUIRES_TEST_DOUBLE_COMSERVER: 'true' + jobs: unit-tests: runs-on: ${{ matrix.os }} diff --git a/comtypes/test/test_dispifc_records.py b/comtypes/test/test_dispifc_records.py index ec797d61..81bda1ca 100644 --- a/comtypes/test/test_dispifc_records.py +++ b/comtypes/test/test_dispifc_records.py @@ -1,5 +1,6 @@ # coding: utf-8 +import os import unittest from comtypes import CLSCTX_LOCAL_SERVER @@ -13,7 +14,9 @@ import comtypes.gen.ComtypesCppTestSrvLib as ComtypesCppTestSrvLib IMPORT_FAILED = False -except (ImportError, OSError): +except (ImportError, OSError) as e: + if os.environ.get("REQUIRES_TEST_DOUBLE_COMSERVER") == "true": + raise RuntimeError("This depends on the out of process COM-server.") from e IMPORT_FAILED = True