Update of /cvsroot/pywin32/pywin32/com/win32com/test
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv18082/com/win32com/test
Modified Files:
testDictionary.py testExchange.py testIterators.py
testPyComTest.py testmakepy.py testvb.py
Log Message:
more moderizations merged from py3k work
Index: testPyComTest.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32com/test/testPyComTest.py,v
retrieving revision 1.38
retrieving revision 1.39
diff -C2 -d -r1.38 -r1.39
*** testPyComTest.py 27 Nov 2008 05:58:17 -0000 1.38
--- testPyComTest.py 27 Nov 2008 09:33:22 -0000 1.39
***************
*** 84,88 ****
if not self.fireds:
print "ERROR: Nothing was received!"
! for firedId, no in self.fireds.items():
progress("ID %d fired %d times" % (firedId, no))
--- 84,88 ----
if not self.fireds:
print "ERROR: Nothing was received!"
! for firedId, no in self.fireds.iteritems():
progress("ID %d fired %d times" % (firedId, no))
Index: testExchange.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32com/test/testExchange.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** testExchange.py 30 Jun 2008 13:50:09 -0000 1.7
--- testExchange.py 27 Nov 2008 09:33:22 -0000 1.8
***************
*** 61,65 ****
PropTagsById={}
if ammodule:
! for name, val in ammodule.constants.__dict__.items():
PropTagsById[val] = name
--- 61,65 ----
PropTagsById={}
if ammodule:
! for name, val in ammodule.constants.__dict__.iteritems():
PropTagsById[val] = name
Index: testvb.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32com/test/testvb.py,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** testvb.py 26 Nov 2008 08:39:33 -0000 1.22
--- testvb.py 27 Nov 2008 09:33:22 -0000 1.23
***************
*** 290,299 ****
testData = string.split("Mark was here")
resultData, byRefParam = vbtest.PassSAFEARRAY(testData)
- # Un unicode everything (only 1.5.2)
- try:
- unicode
- except NameError : # No builtin named Unicode!
- resultData = map(str, resultData)
- byRefParam = map(str, byRefParam)
if testData != list(resultData):
raise error("The safe array data was not what we expected - got " + str(resultData))
--- 290,293 ----
Index: testIterators.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32com/test/testIterators.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** testIterators.py 10 Nov 2003 00:49:29 -0000 1.3
--- testIterators.py 27 Nov 2008 09:33:22 -0000 1.4
***************
*** 122,126 ****
# We dont want our base class run
suite = unittest.TestSuite()
! for item in globals().values():
if type(item)==type(unittest.TestCase) and \
issubclass(item, unittest.TestCase) and \
--- 122,126 ----
# We dont want our base class run
suite = unittest.TestSuite()
! for item in globals().itervalues():
if type(item)==type(unittest.TestCase) and \
issubclass(item, unittest.TestCase) and \
Index: testmakepy.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32com/test/testmakepy.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** testmakepy.py 12 Apr 2005 06:17:02 -0000 1.5
--- testmakepy.py 27 Nov 2008 09:33:22 -0000 1.6
***************
*** 42,46 ****
tinfo = (info.clsid, info.lcid, info.major, info.minor)
mod = gencache.EnsureModule(info.clsid, info.lcid, info.major, info.minor)
! for name in mod.NamesToIIDMap.keys():
makepy.GenerateChildFromTypeLibSpec(name, tinfo)
return num
--- 42,46 ----
tinfo = (info.clsid, info.lcid, info.major, info.minor)
mod = gencache.EnsureModule(info.clsid, info.lcid, info.major, info.minor)
! for name in mod.NamesToIIDMap.iterkeys():
makepy.GenerateChildFromTypeLibSpec(name, tinfo)
return num
Index: testDictionary.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32com/test/testDictionary.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** testDictionary.py 27 Nov 2008 03:53:25 -0000 1.9
--- testDictionary.py 27 Nov 2008 09:33:22 -0000 1.10
***************
*** 18,22 ****
def TestDictAgainst(dict,check):
! for key, value in check.items():
if dict(key) != value:
raise error("Indexing for '%s' gave the incorrect value - %s/%s" % (repr(key), repr(dict[key]), repr(check[key])))
--- 18,22 ----
def TestDictAgainst(dict,check):
! for key, value in check.iteritems():
if dict(key) != value:
raise error("Indexing for '%s' gave the incorrect value - %s/%s" % (repr(key), repr(dict[key]), repr(check[key])))
|