[pywin32-checkins] pywin32/win32/test test_win32trace.py,1.7,1.8
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2009-01-25 03:19:25
|
Update of /cvsroot/pywin32/pywin32/win32/test In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv31679/win32/test Modified Files: test_win32trace.py Log Message: * Fix handling of local vs global object detection yet again :( * Make py3k-friendly by using encoding as latin-1. Index: test_win32trace.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/test/test_win32trace.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** test_win32trace.py 4 Dec 2008 07:00:21 -0000 1.7 --- test_win32trace.py 25 Jan 2009 03:19:22 -0000 1.8 *************** *** 15,19 **** time.sleep(0.05) if win32trace.read() != "Hi": ! # Reset everything so following tests still fail with this error!S win32trace.TermRead() win32trace.TermWrite() --- 15,19 ---- time.sleep(0.05) if win32trace.read() != "Hi": ! # Reset everything so following tests still fail with this error! win32trace.TermRead() win32trace.TermWrite() *************** *** 102,109 **** --- 102,122 ---- self.assertEquals('Syver Enstad', syverEnstad) + def testRoundTripUnicode(self): + win32trace.write(u'\xa9opyright Syver Enstad') + syverEnstad = win32trace.read() + # str objects are always returned in py2k (latin-1 encoding was used + # on unicode objects) + self.assertEquals('\xa9opyright Syver Enstad', syverEnstad) + def testBlockingRead(self): win32trace.write('Syver Enstad') self.assertEquals('Syver Enstad', win32trace.blockingread()) + def testBlockingReadUnicode(self): + win32trace.write(u'\xa9opyright Syver Enstad') + # str objects are always returned in py2k (latin-1 encoding was used + # on unicode objects) + self.assertEquals('\xa9opyright Syver Enstad', win32trace.blockingread()) + def testFlush(self): win32trace.flush() |