diff options
author | INADA Naoki <songofacandy@gmail.com> | 2010-11-03 03:11:00 +0900 |
---|---|---|
committer | INADA Naoki <songofacandy@gmail.com> | 2010-11-03 03:11:00 +0900 |
commit | a09c85ff9c846384cf681fa955ce931010995055 (patch) | |
tree | eb84339700ef0d5892adc12d9a47dc4531c0e708 /test/test_sequnpack.py | |
parent | 3903979a84c4d450acc55faceb3f816ff7a32398 (diff) | |
download | msgpack-python-a09c85ff9c846384cf681fa955ce931010995055.tar.gz |
python: Support old buffer protocol when unpack. (experimental)
Diffstat (limited to 'test/test_sequnpack.py')
-rw-r--r-- | test/test_sequnpack.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/test/test_sequnpack.py b/test/test_sequnpack.py index 789ccd2..df6e308 100644 --- a/test/test_sequnpack.py +++ b/test/test_sequnpack.py @@ -1,22 +1,22 @@ #!/usr/bin/env python # coding: utf-8 -from __future__ import unicode_literals, print_function +from __future__ import unicode_literals from msgpack import Unpacker def test_foobar(): unpacker = Unpacker(read_size=3) unpacker.feed(b'foobar') - assert unpacker.unpack() == ord('f') - assert unpacker.unpack() == ord('o') - assert unpacker.unpack() == ord('o') - assert unpacker.unpack() == ord('b') - assert unpacker.unpack() == ord('a') - assert unpacker.unpack() == ord('r') + assert unpacker.unpack() == ord(b'f') + assert unpacker.unpack() == ord(b'o') + assert unpacker.unpack() == ord(b'o') + assert unpacker.unpack() == ord(b'b') + assert unpacker.unpack() == ord(b'a') + assert unpacker.unpack() == ord(b'r') try: o = unpacker.unpack() - print("Oops!", o) + print "Oops!", o assert 0 except StopIteration: assert 1 |