From d5ce2b43d602282fe2aa826481759c48d18c9b38 Mon Sep 17 00:00:00 2001 From: Scott Maxwell Date: Thu, 31 Oct 2013 18:52:55 -0700 Subject: [PATCH] More type fixes --- tests/test_sftp_big.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/test_sftp_big.py b/tests/test_sftp_big.py index 379bfe1..b7ffe0b 100644 --- a/tests/test_sftp_big.py +++ b/tests/test_sftp_big.py @@ -124,7 +124,7 @@ class BigSFTPTest (unittest.TestCase): write a 1MB file, with no linefeeds, using pipelining. """ sftp = get_sftp() - kblob = ''.join([struct.pack('>H', n) for n in range(512)]) + kblob = bytes().join([struct.pack('>H', n) for n in range(512)]) start = time.time() try: f = sftp.open('%s/hongry.txt' % FOLDER, 'w') @@ -165,7 +165,7 @@ class BigSFTPTest (unittest.TestCase): def test_4_prefetch_seek(self): sftp = get_sftp() - kblob = ''.join([struct.pack('>H', n) for n in range(512)]) + kblob = bytes().join([struct.pack('>H', n) for n in range(512)]) try: f = sftp.open('%s/hongry.txt' % FOLDER, 'w') f.set_pipelined(True) @@ -203,7 +203,7 @@ class BigSFTPTest (unittest.TestCase): def test_5_readv_seek(self): sftp = get_sftp() - kblob = ''.join([struct.pack('>H', n) for n in range(512)]) + kblob = bytes().join([struct.pack('>H', n) for n in range(512)]) try: f = sftp.open('%s/hongry.txt' % FOLDER, 'w') f.set_pipelined(True) @@ -279,7 +279,7 @@ class BigSFTPTest (unittest.TestCase): verify that prefetch and readv don't conflict with each other. """ sftp = get_sftp() - kblob = ''.join([struct.pack('>H', n) for n in range(512)]) + kblob = bytes().join([struct.pack('>H', n) for n in range(512)]) try: f = sftp.open('%s/hongry.txt' % FOLDER, 'w') f.set_pipelined(True) @@ -318,7 +318,7 @@ class BigSFTPTest (unittest.TestCase): returned as a single blob. """ sftp = get_sftp() - kblob = ''.join([struct.pack('>H', n) for n in range(512)]) + kblob = bytes().join([struct.pack('>H', n) for n in range(512)]) try: f = sftp.open('%s/hongry.txt' % FOLDER, 'w') f.set_pipelined(True) @@ -372,7 +372,7 @@ class BigSFTPTest (unittest.TestCase): f.close() self.assertEqual(sftp.stat('%s/hongry.txt' % FOLDER).st_size, 1024 * 1024) - self.assertNotEquals(t.H, t.session_id) + self.assertNotEqual(t.H, t.session_id) # try to read it too. f = sftp.open('%s/hongry.txt' % FOLDER, 'r', 128 * 1024)