diff --git a/comtypes/test/test_casesensitivity.py b/comtypes/test/test_casesensitivity.py index ae93345d4..0fbaff1bb 100644 --- a/comtypes/test/test_casesensitivity.py +++ b/comtypes/test/test_casesensitivity.py @@ -1,41 +1,31 @@ +import contextlib import unittest from comtypes.client import GetModule -iem = GetModule("shdocvw.dll") +with contextlib.redirect_stdout(None): # supress warnings + GetModule("msvidctl.dll") +from comtypes.gen import MSVidCtlLib as msvidctl class TestCase(unittest.TestCase): def test(self): - from comtypes.client import GetModule - - iem = GetModule("shdocvw.dll") - # IDispatch(IUnknown) - # IWebBrowser(IDispatch) - # IWebBrowserApp(IWebBrowser) - # IWebBrowser2(IWebBrowserApp) - - # print iem.IWebBrowser2.mro() - - self.assertTrue(issubclass(iem.IWebBrowser2, iem.IWebBrowserApp)) - self.assertTrue(issubclass(iem.IWebBrowserApp, iem.IWebBrowser)) + # IMSVidDevice(IDispatch) + # IMSVidInputDevice(IMSVidDevice) + # IMSVidPlayback(IMSVidOutputDevice) - # print sorted(iem.IWebBrowser.__map_case__.keys()) - # print "=" * 42 - # print sorted(iem.IWebBrowserApp.__map_case__.keys()) - # print "=" * 42 - # print sorted(iem.IWebBrowser2.__map_case__.keys()) - # print "=" * 42 + self.assertTrue(issubclass(msvidctl.IMSVidPlayback, msvidctl.IMSVidInputDevice)) + self.assertTrue(issubclass(msvidctl.IMSVidInputDevice, msvidctl.IMSVidDevice)) # names in the base class __map_case__ must also appear in the # subclass. - for name in iem.IWebBrowser.__map_case__: - self.assertTrue(name in iem.IWebBrowserApp.__map_case__, f"{name} missing") - self.assertTrue(name in iem.IWebBrowser2.__map_case__, f"{name} missing") + for name in msvidctl.IMSVidDevice.__map_case__: + self.assertIn(name, msvidctl.IMSVidInputDevice.__map_case__) + self.assertIn(name, msvidctl.IMSVidPlayback.__map_case__) - for name in iem.IWebBrowserApp.__map_case__: - self.assertTrue(name in iem.IWebBrowser2.__map_case__, f"{name} missing") + for name in msvidctl.IMSVidInputDevice.__map_case__: + self.assertIn(name, msvidctl.IMSVidPlayback.__map_case__) if __name__ == "__main__": diff --git a/comtypes/test/test_ie.py b/comtypes/test/test_eventinterface.py similarity index 94% rename from comtypes/test/test_ie.py rename to comtypes/test/test_eventinterface.py index 1e5c60951..fa81561fe 100644 --- a/comtypes/test/test_ie.py +++ b/comtypes/test/test_eventinterface.py @@ -6,6 +6,9 @@ def setUpModule(): + # The primary goal is to verify how `GetEvents` behaves when the + # `interface` argument is explicitly specified versus when it is omitted, + # using an object that has multiple outgoing event interfaces. raise ut.SkipTest( "External test dependencies like this seem bad. Find a different built-in " "win32 API to use." diff --git a/pyproject.toml b/pyproject.toml index ba9e49d68..f9cea138d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -88,7 +88,7 @@ ignore = ["E402"] "comtypes/test/test_agilent.py" = ["F401", "F841"] "comtypes/test/test_client.py" = ["F401"] "comtypes/test/test_dict.py" = ["F841"] -"comtypes/test/test_ie.py" = ["F841"] +"comtypes/test/test_eventinterface.py" = ["F841"] "comtypes/test/test_outparam.py" = ["F841"] "comtypes/test/test_sapi.py" = ["E401"] "comtypes/test/test_server.py" = ["F401", "F841"]