summaryrefslogtreecommitdiffhomepage
path: root/tests/test_file.py
diff options
context:
space:
mode:
authorMatthias Witte <m.witte@telekom.de>2014-11-25 18:15:16 +0100
committerMatthias Witte <m.witte@telekom.de>2014-11-25 18:15:16 +0100
commitb3b0f2d0dff3aef736128935302aeb6adb1ee020 (patch)
tree16d9fe959aede76a0a6ed4d1a6e59a90198dc6f8 /tests/test_file.py
parent47da1935dc84784bfee2e493474232bf2e0d8d37 (diff)
parent838ab5b23274ddea0b5671b7f2d5a295dcd02dfe (diff)
Merge upstream branch 'master' into add_sha2_support
Conflicts: paramiko/transport.py tests/test_transport.py
Diffstat (limited to 'tests/test_file.py')
-rwxr-xr-xtests/test_file.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_file.py b/tests/test_file.py
index c6edd7af..22a34aca 100755
--- a/tests/test_file.py
+++ b/tests/test_file.py
@@ -23,6 +23,7 @@ Some unit tests for the BufferedFile abstraction.
import unittest
from paramiko.file import BufferedFile
from paramiko.common import linefeed_byte, crlf, cr_byte
+import sys
class LoopbackFile (BufferedFile):
@@ -151,6 +152,15 @@ class BufferedFileTest (unittest.TestCase):
b'need to close them again.\n')
f.close()
+ def test_8_buffering(self):
+ """
+ verify that buffered objects can be written
+ """
+ if sys.version_info[0] == 2:
+ f = LoopbackFile('r+', 16)
+ f.write(buffer(b'Too small.'))
+ f.close()
+
if __name__ == '__main__':
from unittest import main
main()