[pywin32-checkins] pywin32/win32/test test_win32trace.py,1.1,1.2
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: <mha...@us...> - 2003-08-31 04:48:19
|
Update of /cvsroot/pywin32/pywin32/win32/test In directory sc8-pr-cvs1:/tmp/cvs-serv7459/test Modified Files: test_win32trace.py Log Message: Don't just die when we try and write >64k of data (now we only write a max of 32k at a time, and sleep either 10ms or until a reader empties the buffer, then write the next chunk.) Add tests for the above. Index: test_win32trace.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/test/test_win32trace.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** test_win32trace.py 2 May 2003 00:04:45 -0000 1.1 --- test_win32trace.py 31 Aug 2003 04:47:57 -0000 1.2 *************** *** 168,171 **** --- 168,187 ---- assert self.areBucketsFull() + class TestHugeChunks(unittest.TestCase): + # BiggestChunk is the size where we stop stressing the writer + BiggestChunk = 2**16 # 256k should do it. + def setUp(self): + win32trace.InitRead() + win32trace.InitWrite() + def testHugeChunks(self): + data = "*" * 1023 + "\n" + while len(data) <= self.BiggestChunk: + win32trace.write(data) + data = data + data + # If we made it here, we passed. + + def tearDown(self): + win32trace.TermRead() + win32trace.TermWrite() import win32event |