Update of /cvsroot/pywin32/pywin32/com/win32com/test
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv32320/com/win32com/test
Modified Files:
policySemantics.py testGIT.py testMSOffice.py testPyComTest.py
Log Message:
Modernize != syntax (ie, remove old '<>'
Index: testMSOffice.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32com/test/testMSOffice.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** testMSOffice.py 26 Nov 2008 08:52:32 -0000 1.9
--- testMSOffice.py 27 Nov 2008 04:15:21 -0000 1.10
***************
*** 104,122 ****
xl.Cells(i+1,i+1).Value = "Hi %d" % i
! if xl.Range("A1").Value <> "Hi 0":
raise error("Single cell range failed")
! if xl.Range("A1:B1").Value <> ((Unicode("Hi 0"),2),):
raise error("flat-horizontal cell range failed")
! if xl.Range("A1:A2").Value <> ((Unicode("Hi 0"),),(Unicode("x"),)):
raise error("flat-vertical cell range failed")
! if xl.Range("A1:C3").Value <> ((Unicode("Hi 0"),2,3),(Unicode("x"),Unicode("Hi 1"),Unicode("z")),(3,2,Unicode("Hi 2"))):
raise error("square cell range failed")
xl.Range("A1:C3").Value =((3,2,1),("x","y","z"),(1,2,3))
! if xl.Range("A1:C3").Value <> ((3,2,1),(Unicode("x"),Unicode("y"),Unicode("z")),(1,2,3)):
raise error("Range was not what I set it to!")
--- 104,122 ----
xl.Cells(i+1,i+1).Value = "Hi %d" % i
! if xl.Range("A1").Value != "Hi 0":
raise error("Single cell range failed")
! if xl.Range("A1:B1").Value != ((Unicode("Hi 0"),2),):
raise error("flat-horizontal cell range failed")
! if xl.Range("A1:A2").Value != ((Unicode("Hi 0"),),(Unicode("x"),)):
raise error("flat-vertical cell range failed")
! if xl.Range("A1:C3").Value != ((Unicode("Hi 0"),2,3),(Unicode("x"),Unicode("Hi 1"),Unicode("z")),(3,2,Unicode("Hi 2"))):
raise error("square cell range failed")
xl.Range("A1:C3").Value =((3,2,1),("x","y","z"),(1,2,3))
! if xl.Range("A1:C3").Value != ((3,2,1),(Unicode("x"),Unicode("y"),Unicode("z")),(1,2,3)):
raise error("Range was not what I set it to!")
Index: testGIT.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32com/test/testGIT.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** testGIT.py 26 Nov 2008 08:52:32 -0000 1.2
--- testGIT.py 27 Nov 2008 04:15:21 -0000 1.3
***************
*** 28,32 ****
def TestInterp(interp):
! if interp.Eval("1+1") <> 2:
raise ValueError("The interpreter returned the wrong result.")
try:
--- 28,32 ----
def TestInterp(interp):
! if interp.Eval("1+1") != 2:
raise ValueError("The interpreter returned the wrong result.")
try:
Index: policySemantics.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32com/test/policySemantics.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** policySemantics.py 27 Nov 2008 04:05:54 -0000 1.8
--- policySemantics.py 27 Nov 2008 04:15:21 -0000 1.9
***************
*** 49,53 ****
break
dispids.sort()
! if dispids <> [pythoncom.DISPID_EVALUATE, pythoncom.DISPID_NEWENUM, 10, 11, 1000]:
raise Error("Got back the wrong dispids: %s" % dispids)
--- 49,53 ----
break
dispids.sort()
! if dispids != [pythoncom.DISPID_EVALUATE, pythoncom.DISPID_NEWENUM, 10, 11, 1000]:
raise Error("Got back the wrong dispids: %s" % dispids)
Index: testPyComTest.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32com/test/testPyComTest.py,v
retrieving revision 1.36
retrieving revision 1.37
diff -C2 -d -r1.36 -r1.37
*** testPyComTest.py 27 Nov 2008 03:53:25 -0000 1.36
--- testPyComTest.py 27 Nov 2008 04:15:21 -0000 1.37
***************
*** 377,386 ****
counter.LBound=1
counter.UBound=10
! if counter.LBound <> 1 or counter.UBound<>10:
print "** Error - counter did not keep its properties"
if bIsGenerated:
bounds = counter.GetBounds()
! if bounds[0]<>1 or bounds[1]<>10:
raise error("** Error - counter did not give the same properties back")
counter.SetBounds(bounds[0], bounds[1])
--- 377,386 ----
counter.LBound=1
counter.UBound=10
! if counter.LBound != 1 or counter.UBound!=10:
print "** Error - counter did not keep its properties"
if bIsGenerated:
bounds = counter.GetBounds()
! if bounds[0]!=1 or bounds[1]!=10:
raise error("** Error - counter did not give the same properties back")
counter.SetBounds(bounds[0], bounds[1])
***************
*** 388,394 ****
for item in counter:
num = num + 1
! if num <> len(counter):
raise error("*** Length of counter and loop iterations dont match ***")
! if num <> 10:
raise error("*** Unexpected number of loop iterations ***")
--- 388,394 ----
for item in counter:
num = num + 1
! if num != len(counter):
raise error("*** Length of counter and loop iterations dont match ***")
! if num != 10:
raise error("*** Unexpected number of loop iterations ***")
***************
*** 398,402 ****
for item in counter:
num = num + 1
! if num <> 10:
raise error("*** Unexpected number of loop iterations - got %d ***" % num)
progress("Finished testing counter")
--- 398,402 ----
for item in counter:
num = num + 1
! if num != 10:
raise error("*** Unexpected number of loop iterations - got %d ***" % num)
progress("Finished testing counter")
|