summaryrefslogtreecommitdiffhomepage
path: root/tests/test_file.py
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2017-10-23 11:31:03 -0700
committerJeff Forcier <jeff@bitprophet.org>2018-09-17 14:15:32 -0700
commit6a4233be4bcddf480dd3d5ef96cdc8f39ad16795 (patch)
tree71471d725b6ad0d95361bb8dece58781374c0372 /tests/test_file.py
parent6b96afd1d32316b0be3c28d3b5d298493086de27 (diff)
Import cleanup, mostly focused on s/tests/./
Diffstat (limited to 'tests/test_file.py')
-rwxr-xr-xtests/test_file.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/test_file.py b/tests/test_file.py
index b33ecd51..3d2c94e6 100755
--- a/tests/test_file.py
+++ b/tests/test_file.py
@@ -27,7 +27,7 @@ from paramiko.common import linefeed_byte, crlf, cr_byte
from paramiko.file import BufferedFile
from paramiko.py3compat import BytesIO
-from tests import skipUnlessBuiltin
+from .util import needs_builtin
class LoopbackFile (BufferedFile):
@@ -198,13 +198,13 @@ class BufferedFileTest (unittest.TestCase):
f.write(text)
self.assertEqual(f.read(), text.encode("utf-8"))
- @skipUnlessBuiltin('memoryview')
+ @needs_builtin('memoryview')
def test_write_bytearray(self):
with LoopbackFile('rb+') as f:
f.write(bytearray(12))
self.assertEqual(f.read(), 12 * b"\0")
- @skipUnlessBuiltin('buffer')
+ @needs_builtin('buffer')
def test_write_buffer(self):
data = 3 * b"pretend giant block of data\n"
offsets = range(0, len(data), 8)
@@ -213,7 +213,7 @@ class BufferedFileTest (unittest.TestCase):
f.write(buffer(data, offset, 8))
self.assertEqual(f.read(), data)
- @skipUnlessBuiltin('memoryview')
+ @needs_builtin('memoryview')
def test_write_memoryview(self):
data = 3 * b"pretend giant block of data\n"
offsets = range(0, len(data), 8)