diff options
author | Robey Pointer <robey@lag.net> | 2008-03-22 19:03:09 -0700 |
---|---|---|
committer | Robey Pointer <robey@lag.net> | 2008-03-22 19:03:09 -0700 |
commit | c0fc67acc9d5365c706057223880ba3f0c775d95 (patch) | |
tree | 56dcc6cf24177310586bcea7d43557cd74554485 /tests/test_sftp_big.py | |
parent | 419b11b74118e27b8f71bdc695d0112cd0e3f378 (diff) |
[project @ robey@lag.net-20080323020309-9bjcp7l2ygdu49d2]
slight tweak to test, make it verify the length too
Diffstat (limited to 'tests/test_sftp_big.py')
-rw-r--r-- | tests/test_sftp_big.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/test_sftp_big.py b/tests/test_sftp_big.py index 1cafe931..c1827624 100644 --- a/tests/test_sftp_big.py +++ b/tests/test_sftp_big.py @@ -376,8 +376,9 @@ class BigSFTPTest (unittest.TestCase): # try to read it too. f = sftp.open('%s/hongry.txt' % FOLDER, 'r', 128 * 1024) f.prefetch() - for i in xrange(32): - f.read(32 * 1024) + total = 0 + while total < 1024 * 1024: + total += len(f.read(32 * 1024)) f.close() finally: sftp.remove('%s/hongry.txt' % FOLDER) |