File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -917,7 +917,12 @@ def test_patch_comtypes():
917917 pytest .skip ("Skipping COM test; OpenDSSDirect.DLL already loaded." )
918918 return
919919
920- import comtypes .client
920+ try :
921+ import comtypes .client
922+ except :
923+ pytest .skip ("Skipping COM test; comtypes is not installed" )
924+ return
925+
921926 DSS_COM = dss .patch_dss_com (comtypes .client .CreateObject ("OpenDSSengine.DSS" ))
922927 test_essentials (DSS_COM )
923928 else :
@@ -932,7 +937,12 @@ def test_patch_win32com():
932937 pytest .skip ("Skipping COM test; OpenDSSDirect.DLL already loaded." )
933938 return
934939
935- import win32com .client
940+ try :
941+ import win32com .client
942+ except :
943+ pytest .skip ("Skipping COM test; win32com is not installed" )
944+ return
945+
936946 win32com .client .Dispatch ("OpenDSSengine.DSS" )
937947 DSS_COM = dss .patch_dss_com (win32com .client .gencache .EnsureDispatch ("OpenDSSengine.DSS" ))
938948 test_essentials (DSS_COM )
You can’t perform that action at this time.
0 commit comments