summaryrefslogtreecommitdiffhomepage
path: root/tests/test_file.py
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2014-09-05 14:22:41 -0700
committerJeff Forcier <jeff@bitprophet.org>2014-09-05 14:22:41 -0700
commit8ece9074003ddc785b72764783102325fe140a75 (patch)
treeb5c48f4bc51193abba2af82d49a5eb147f464562 /tests/test_file.py
parent8455a8a2d2058d1daf55e9f8446a2b4a0676339e (diff)
parentb8022866fac62d1757aa730d5991030f223088fd (diff)
Merge branch 'master' into 335-int
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()