Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bring back Excel early-bind test
Browse files Browse the repository at this point in the history
junkmd committed Feb 17, 2024
1 parent c6f8004 commit 8f70f2d
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions comtypes/test/test_excel.py
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@
from __future__ import print_function

import datetime
import sys
import unittest

from comtypes.client import CreateObject, GetModule
@@ -112,10 +113,16 @@ def test(self):
sh.Range[sh.Cells.Item[4, 1], sh.Cells.Item[6, 3]].Select()


PY_VER = "Python {0}.{1}.{2}".format(*sys.version_info[:3])


@unittest.skipIf(IMPORT_FAILED, "This depends on Excel.")
@unittest.skip(
"There is difference of `Range.Value` behavior "
"between Python >= 3.8.x and Python <= 3.7.x."
@unittest.skipIf(
sys.version_info[:2] == (3, 8)
or sys.version_info[:2] == (3, 9)
or (sys.version_info[:2] == (3, 10) and sys.version_info < (3, 10, 10))
or (sys.version_info[:2] == (3, 11) and sys.version_info < (3, 11, 2)),
f"This fails in {PY_VER}. See https://github.com/enthought/comtypes/issues/212",
)
class Test_EarlyBind(BaseBindTest, unittest.TestCase):
dynamic = False

0 comments on commit 8f70f2d

Please sign in to comment.