Update of /cvsroot/pywin32/pywin32/com/win32com/test
In directory sc8-pr-cvs1:/tmp/cvs-serv28696
Modified Files:
testmakepy.py
Log Message:
Quieten down some errors, and report how many we generated.
Index: testmakepy.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32com/test/testmakepy.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** testmakepy.py 18 Nov 2002 11:20:07 -0000 1.2
--- testmakepy.py 23 Oct 2003 07:08:18 -0000 1.3
***************
*** 12,17 ****
--- 12,19 ----
from win32com.client import makepy, selecttlb
import pythoncom
+ import winerror
def TestBuildAll(verbose = 1):
+ num = 0
tlbInfos = selecttlb.EnumTlbs()
for info in tlbInfos:
***************
*** 20,27 ****
try:
makepy.GenerateFromTypeLibSpec(info)
except pythoncom.com_error, details:
!
! print "COM error on", info.desc
! print details
except KeyboardInterrupt:
print "Interrupted!"
--- 22,33 ----
try:
makepy.GenerateFromTypeLibSpec(info)
+ num += 1
except pythoncom.com_error, details:
! # Ignore these 2 errors, as the are very common and can obscure
! # useful warnings.
! if details[0] not in [winerror.TYPE_E_CANTLOADLIBRARY,
! winerror.TYPE_E_LIBNOTREGISTERED]:
! print "** COM error on", info.desc
! print details
except KeyboardInterrupt:
print "Interrupted!"
***************
*** 30,37 ****
print "Failed:", info.desc
traceback.print_exc()
!
def TestAll(verbose = 0):
! TestBuildAll(verbose)
win32com.test.util.CheckClean()
--- 36,44 ----
print "Failed:", info.desc
traceback.print_exc()
! return num
def TestAll(verbose = 0):
! num = TestBuildAll(verbose)
! print "Generated and imported", num, "modules"
win32com.test.util.CheckClean()
|