diff options
author | Adam Meily <meily.adam@gmail.com> | 2015-12-17 20:18:00 -0500 |
---|---|---|
committer | Adam Meily <meily.adam@gmail.com> | 2015-12-17 20:18:00 -0500 |
commit | 9a87a8eb599d2b3914a3f3fcedbea8b25ab33d5a (patch) | |
tree | 9ca66cf1c5f262e55f5c9cf420d316a6f25d0a00 /tests/test_sftp.py | |
parent | 787839d3bc41cdd86905df6883b7de2b1bfb165a (diff) | |
parent | 844dda88ca1827ede2c3f73792facab7d28eef74 (diff) |
Merge branch 'master' of github.com:paramiko/paramiko
Conflicts:
paramiko/sftp_file.py
sites/www/changelog.rst
Diffstat (limited to 'tests/test_sftp.py')
-rwxr-xr-x | tests/test_sftp.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/test_sftp.py b/tests/test_sftp.py index b1829b4c..53b73ee0 100755 --- a/tests/test_sftp.py +++ b/tests/test_sftp.py @@ -697,7 +697,8 @@ class SFTPTest (unittest.TestCase): f.readv([(0, 12)]) with sftp.open(FOLDER + '/zero', 'r') as f: - f.prefetch() + file_size = f.stat().st_size + f.prefetch(file_size) f.read(100) finally: sftp.unlink(FOLDER + '/zero') @@ -812,6 +813,11 @@ class SFTPTest (unittest.TestCase): sftp.remove('%s/nonutf8data' % FOLDER) + def test_sftp_attributes_empty_str(self): + sftp_attributes = SFTPAttributes() + self.assertEqual(str(sftp_attributes), "?--------- 1 0 0 0 (unknown date) ?") + + if __name__ == '__main__': SFTPTest.init_loopback() # logging is required by test_N_file_with_percent |