More type fixes

This commit is contained in:
Scott Maxwell 2013-10-31 18:52:55 -07:00
parent 0677ea76cd
commit d5ce2b43d6
1 changed files with 6 additions and 6 deletions

View File

@ -124,7 +124,7 @@ class BigSFTPTest (unittest.TestCase):
write a 1MB file, with no linefeeds, using pipelining. write a 1MB file, with no linefeeds, using pipelining.
""" """
sftp = get_sftp() 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() start = time.time()
try: try:
f = sftp.open('%s/hongry.txt' % FOLDER, 'w') f = sftp.open('%s/hongry.txt' % FOLDER, 'w')
@ -165,7 +165,7 @@ class BigSFTPTest (unittest.TestCase):
def test_4_prefetch_seek(self): def test_4_prefetch_seek(self):
sftp = get_sftp() 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: try:
f = sftp.open('%s/hongry.txt' % FOLDER, 'w') f = sftp.open('%s/hongry.txt' % FOLDER, 'w')
f.set_pipelined(True) f.set_pipelined(True)
@ -203,7 +203,7 @@ class BigSFTPTest (unittest.TestCase):
def test_5_readv_seek(self): def test_5_readv_seek(self):
sftp = get_sftp() 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: try:
f = sftp.open('%s/hongry.txt' % FOLDER, 'w') f = sftp.open('%s/hongry.txt' % FOLDER, 'w')
f.set_pipelined(True) f.set_pipelined(True)
@ -279,7 +279,7 @@ class BigSFTPTest (unittest.TestCase):
verify that prefetch and readv don't conflict with each other. verify that prefetch and readv don't conflict with each other.
""" """
sftp = get_sftp() 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: try:
f = sftp.open('%s/hongry.txt' % FOLDER, 'w') f = sftp.open('%s/hongry.txt' % FOLDER, 'w')
f.set_pipelined(True) f.set_pipelined(True)
@ -318,7 +318,7 @@ class BigSFTPTest (unittest.TestCase):
returned as a single blob. returned as a single blob.
""" """
sftp = get_sftp() 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: try:
f = sftp.open('%s/hongry.txt' % FOLDER, 'w') f = sftp.open('%s/hongry.txt' % FOLDER, 'w')
f.set_pipelined(True) f.set_pipelined(True)
@ -372,7 +372,7 @@ class BigSFTPTest (unittest.TestCase):
f.close() f.close()
self.assertEqual(sftp.stat('%s/hongry.txt' % FOLDER).st_size, 1024 * 1024) 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. # try to read it too.
f = sftp.open('%s/hongry.txt' % FOLDER, 'r', 128 * 1024) f = sftp.open('%s/hongry.txt' % FOLDER, 'r', 128 * 1024)