From dee2d87d413eaf9cb38f11c72df10e82a73f452f Mon Sep 17 00:00:00 2001 From: INADA Naoki Date: Sat, 15 Feb 2014 22:16:01 +0900 Subject: six.BytesIO => io.BytesIO --- test/test_pack.py | 6 +++--- test/test_sequnpack.py | 4 ++-- test/test_unpack_raw.py | 12 ++++++------ 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/test/test_pack.py b/test/test_pack.py index 0d3ed6d..2da7089 100644 --- a/test/test_pack.py +++ b/test/test_pack.py @@ -89,7 +89,7 @@ def testPackFloat(): assert packb(1.0, use_single_float=False) == b'\xcb' + struct.pack('>d', 1.0) def testArraySize(sizes=[0, 5, 50, 1000]): - bio = six.BytesIO() + bio = BytesIO() packer = Packer() for size in sizes: bio.write(packer.pack_array_header(size)) @@ -108,7 +108,7 @@ def test_manualreset(sizes=[0, 5, 50, 1000]): for i in range(size): packer.pack(i) - bio = six.BytesIO(packer.bytes()) + bio = BytesIO(packer.bytes()) unpacker = Unpacker(bio, use_list=1) for size in sizes: assert unpacker.unpack() == list(range(size)) @@ -117,7 +117,7 @@ def test_manualreset(sizes=[0, 5, 50, 1000]): assert packer.bytes() == b'' def testMapSize(sizes=[0, 5, 50, 1000]): - bio = six.BytesIO() + bio = BytesIO() packer = Packer() for size in sizes: bio.write(packer.pack_map_header(size)) diff --git a/test/test_sequnpack.py b/test/test_sequnpack.py index f541207..5d37698 100644 --- a/test/test_sequnpack.py +++ b/test/test_sequnpack.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # coding: utf-8 -import six +import io from msgpack import Unpacker, BufferFull from msgpack.exceptions import OutOfData from pytest import raises @@ -79,7 +79,7 @@ def test_readbytes(): assert unpacker.unpack() == ord(b'r') # Test buffer refill - unpacker = Unpacker(six.BytesIO(b'foobar'), read_size=3) + unpacker = Unpacker(io.BytesIO(b'foobar'), read_size=3) assert unpacker.unpack() == ord(b'f') assert unpacker.read_bytes(3) == b'oob' assert unpacker.unpack() == ord(b'a') diff --git a/test/test_unpack_raw.py b/test/test_unpack_raw.py index 9f3784c..7002601 100644 --- a/test/test_unpack_raw.py +++ b/test/test_unpack_raw.py @@ -1,19 +1,19 @@ """Tests for cases where the user seeks to obtain packed msgpack objects""" -import six +import io from msgpack import Unpacker, packb def test_write_bytes(): unpacker = Unpacker() unpacker.feed(b'abc') - f = six.BytesIO() + f = io.BytesIO() assert unpacker.unpack(f.write) == ord('a') assert f.getvalue() == b'a' - f = six.BytesIO() + f = io.BytesIO() assert unpacker.skip(f.write) is None assert f.getvalue() == b'b' - f = six.BytesIO() + f = io.BytesIO() assert unpacker.skip() is None assert f.getvalue() == b'' @@ -21,9 +21,9 @@ def test_write_bytes(): def test_write_bytes_multi_buffer(): long_val = (5) * 100 expected = packb(long_val) - unpacker = Unpacker(six.BytesIO(expected), read_size=3, max_buffer_size=3) + unpacker = Unpacker(io.BytesIO(expected), read_size=3, max_buffer_size=3) - f = six.BytesIO() + f = io.BytesIO() unpacked = unpacker.unpack(f.write) assert unpacked == long_val assert f.getvalue() == expected -- cgit v1.2.1