Update of /cvsroot/pywin32/pywin32/com/win32com/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1953
Modified Files:
Tag: py3k
testStreams.py
Log Message:
Use bytes for test data
Index: testStreams.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32com/test/testStreams.py,v
retrieving revision 1.6
retrieving revision 1.6.2.1
diff -C2 -d -r1.6 -r1.6.2.1
*** testStreams.py 31 Aug 2007 02:08:14 -0000 1.6
--- testStreams.py 13 Sep 2008 12:27:42 -0000 1.6.2.1
***************
*** 10,14 ****
_com_interfaces_ = [ pythoncom.IID_IPersistStreamInit ]
def __init__(self):
! self.data = "abcdefg"
self.dirty = 1
def GetClassID(self):
--- 10,14 ----
_com_interfaces_ = [ pythoncom.IID_IPersistStreamInit ]
def __init__(self):
! self.data = b"abcdefg"
self.dirty = 1
def GetClassID(self):
***************
*** 55,59 ****
self.index = len(self.data)+dist
else:
! raise ValueError, 'Unknown Seek type: ' +str(origin)
if self.index < 0:
self.index = 0
--- 55,59 ----
self.index = len(self.data)+dist
else:
! raise ValueError('Unknown Seek type: ' +str(origin))
if self.index < 0:
self.index = 0
***************
*** 67,71 ****
"""
def Read(self, amount):
! return 'x'*(amount+1)
class StreamTest(win32com.test.util.TestCase):
--- 67,71 ----
"""
def Read(self, amount):
! return b'x'*(amount+1)
class StreamTest(win32com.test.util.TestCase):
***************
*** 81,85 ****
def testit(self):
! mydata = 'abcdefghijklmnopqrstuvwxyz'
# First test the objects just as Python objects...
--- 81,85 ----
def testit(self):
! mydata = b'abcdefghijklmnopqrstuvwxyz'
# First test the objects just as Python objects...
***************
*** 101,105 ****
self._readWrite(mydata, s2, s2)
! self._readWrite("string with\0a NULL", s2, s2)
# reset the stream
s.Write(mydata)
--- 101,105 ----
self._readWrite(mydata, s2, s2)
! self._readWrite(b"string with\0a NULL", s2, s2)
# reset the stream
s.Write(mydata)
|