Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
junkmd committed May 26, 2024
1 parent 33e7a9d commit 4ad89eb
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 9 deletions.
34 changes: 26 additions & 8 deletions .github/workflows/autotest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ on:
push:
branches: [main]

env:
REQUIRES_TEST_DOUBLE_COMSERVER: 'true'

jobs:
tests:
unit-test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand All @@ -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
Expand All @@ -38,4 +35,25 @@ jobs:
- name: Unregister the OutProc COM server
run: |
cd source/OutProcSrv
./server.exe /UnregServer
./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
5 changes: 4 additions & 1 deletion comtypes/test/test_dispifc_records.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# coding: utf-8

import os
import unittest

from comtypes import CLSCTX_LOCAL_SERVER
Expand All @@ -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


Expand Down

0 comments on commit 4ad89eb

Please sign in to comment.