slight tweak to test, make it verify the length too
This commit is contained in:
parent
419b11b741
commit
c0fc67acc9
|
@ -376,8 +376,9 @@ class BigSFTPTest (unittest.TestCase):
|
||||||
# try to read it too.
|
# try to read it too.
|
||||||
f = sftp.open('%s/hongry.txt' % FOLDER, 'r', 128 * 1024)
|
f = sftp.open('%s/hongry.txt' % FOLDER, 'r', 128 * 1024)
|
||||||
f.prefetch()
|
f.prefetch()
|
||||||
for i in xrange(32):
|
total = 0
|
||||||
f.read(32 * 1024)
|
while total < 1024 * 1024:
|
||||||
|
total += len(f.read(32 * 1024))
|
||||||
f.close()
|
f.close()
|
||||||
finally:
|
finally:
|
||||||
sftp.remove('%s/hongry.txt' % FOLDER)
|
sftp.remove('%s/hongry.txt' % FOLDER)
|
||||||
|
|
Loading…
Reference in New Issue