Update of /cvsroot/pywin32/pywin32/com/win32com/test
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv31031/com/win32com/test
Modified Files:
policySemantics.py testCollections.py testDictionary.py
testGatewayAddresses.py testPyComTest.py
Log Message:
Replace backticks with explicit repr() calls.
Index: testGatewayAddresses.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32com/test/testGatewayAddresses.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** testGatewayAddresses.py 2 Oct 2008 11:18:28 -0000 1.3
--- testGatewayAddresses.py 27 Nov 2008 03:53:25 -0000 1.4
***************
*** 58,62 ****
global numErrors
numErrors = numErrors + 1
! print when, "are not identical (%s, %s)" % (`ob1`, `ob2`)
--- 58,62 ----
global numErrors
numErrors = numErrors + 1
! print when, "are not identical (%s, %s)" % (repr(ob1), repr(ob2))
Index: testCollections.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32com/test/testCollections.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** testCollections.py 26 Nov 2008 08:52:32 -0000 1.5
--- testCollections.py 27 Nov 2008 03:53:25 -0000 1.6
***************
*** 34,42 ****
for i in range(len(check)):
if o(i) != check[i]:
! raise error("Using default method gave the incorrect value - %s/%s" % (`o(i)`, `check[i]`))
for i in range(len(check)):
if o.Item(i) != check[i]:
! raise error("Using Item method gave the incorrect value - %s/%s" % (`o(i)`, `check[i]`))
# First try looping.
--- 34,42 ----
for i in range(len(check)):
if o(i) != check[i]:
! raise error("Using default method gave the incorrect value - %s/%s" % (repr(o(i)), repr(check[i])))
for i in range(len(check)):
if o.Item(i) != check[i]:
! raise error("Using Item method gave the incorrect value - %s/%s" % (repr(o(i)), repr(check[i])))
# First try looping.
***************
*** 46,50 ****
if cmp[:len(check)] != check:
! raise error("Result after looping isnt correct - %s/%s" % (`cmp[:len(check)]`, `check`))
for i in range(len(check)):
--- 46,50 ----
if cmp[:len(check)] != check:
! raise error("Result after looping isnt correct - %s/%s" % (repr(cmp[:len(check)]), repr(check)))
for i in range(len(check)):
Index: policySemantics.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32com/test/policySemantics.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** policySemantics.py 26 Nov 2008 08:52:32 -0000 1.6
--- policySemantics.py 27 Nov 2008 03:53:25 -0000 1.7
***************
*** 59,63 ****
# invoke _value_
if ob() != (1,2,3):
! raise Error("Bad result - got %s" % (`ob()`))
dispob = ob._oleobj_
--- 59,63 ----
# invoke _value_
if ob() != (1,2,3):
! raise Error("Bad result - got %s" % (repr(ob())))
dispob = ob._oleobj_
Index: testDictionary.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32com/test/testDictionary.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** testDictionary.py 26 Nov 2008 08:52:32 -0000 1.8
--- testDictionary.py 27 Nov 2008 03:53:25 -0000 1.9
***************
*** 20,24 ****
for key, value in check.items():
if dict(key) != value:
! raise error("Indexing for '%s' gave the incorrect value - %s/%s" % (`key`, `dict[key]`, `check[key]`))
# Ensure we have the correct version registered.
--- 20,24 ----
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])))
# Ensure we have the correct version registered.
Index: testPyComTest.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32com/test/testPyComTest.py,v
retrieving revision 1.35
retrieving revision 1.36
diff -C2 -d -r1.35 -r1.36
*** testPyComTest.py 26 Nov 2008 08:52:32 -0000 1.35
--- testPyComTest.py 27 Nov 2008 03:53:25 -0000 1.36
***************
*** 351,355 ****
def TestCounter(counter, bIsGenerated):
# Test random access into container
! progress("Testing counter", `counter`)
import random
for i in xrange(50):
--- 351,355 ----
def TestCounter(counter, bIsGenerated):
# Test random access into container
! progress("Testing counter", repr(counter))
import random
for i in xrange(50):
***************
*** 358,362 ****
ret = counter[num]
if ret != num+1:
! raise error("Random access into element %d failed - return was %s" % (num,`ret`))
except IndexError:
raise error("** IndexError accessing collection element %d" % num)
--- 358,362 ----
ret = counter[num]
if ret != num+1:
! raise error("Random access into element %d failed - return was %s" % (num,repr(ret)))
except IndexError:
raise error("** IndexError accessing collection element %d" % num)
|