From 4ad89ebcffeb4a0bbf3607c9623f12611d64e307 Mon Sep 17 00:00:00 2001 From: junkmd Date: Mon, 27 May 2024 08:26:40 +0900 Subject: [PATCH] update --- .github/workflows/autotest.yml | 34 ++++++++++++++++++++------- comtypes/test/test_dispifc_records.py | 5 +++- 2 files changed, 30 insertions(+), 9 deletions(-) diff --git a/.github/workflows/autotest.yml b/.github/workflows/autotest.yml index 3edabc2b..bfc255aa 100644 --- a/.github/workflows/autotest.yml +++ b/.github/workflows/autotest.yml @@ -4,8 +4,11 @@ on: push: branches: [main] +env: + REQUIRES_TEST_DOUBLE_COMSERVER: 'true' + jobs: - tests: + unit-test: runs-on: ${{ matrix.os }} strategy: matrix: @@ -19,12 +22,6 @@ jobs: with: python-version: ${{ matrix.python-version }} architecture: ${{ matrix.architecture }} - - name: install comtypes - run: | - pip install --upgrade setuptools - python setup.py install - pip uninstall comtypes -y - python test_pip_install.py - name: Set up MSVC uses: ilammy/msvc-dev-cmd@v1 - name: Build and register the OutProc COM server @@ -38,4 +35,25 @@ jobs: - name: Unregister the OutProc COM server run: | cd source/OutProcSrv - ./server.exe /UnregServer \ No newline at end of file + ./server.exe /UnregServer + + install-test: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [windows-latest, windows-2019] + python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] + architecture: ['x86', 'x64'] + steps: + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + architecture: ${{ matrix.architecture }} + - name: install comtypes + run: | + pip install --upgrade setuptools + python setup.py install + pip uninstall comtypes -y + python test_pip_install.py diff --git a/comtypes/test/test_dispifc_records.py b/comtypes/test/test_dispifc_records.py index a117aaa2..7e353ef3 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 @@ -14,7 +15,9 @@ import comtypes.gen.ComtypesTestLib as ComtypesTestLib 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