diff options
author | Christopher Baines <mail@cbaines.net> | 2016-02-07 21:19:28 +0000 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2016-02-07 21:19:28 +0000 |
commit | 31b2fd0709f259961253b9cdc875ce7827abaa68 (patch) | |
tree | 863b7f1fe851d7183419916248591537a4b8b6c5 /tests/test_sftp.py | |
parent | bf855e6da326dba0c46f005eedc9f390c6c3b206 (diff) | |
download | python-paramiko-upstream/1.16.0.tar python-paramiko-upstream/1.16.0.tar.gz |
Imported Upstream version 1.16.0upstream/1.16.0upstream
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 cb8f7f8..131b8ab 100755 --- a/tests/test_sftp.py +++ b/tests/test_sftp.py @@ -696,7 +696,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') @@ -811,6 +812,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 |