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 | 4688252bd41082a0dd077b150b53834c0346cdb1 (patch) | |
| tree | b02b206f878b4cdcaa2a507b9c8ce85aec93e577 /python/test/test_sequnpack.py | |
| parent | b1df5d3ad77187d6a2bdf67552268511808ab06b (diff) | |
| download | msgpack-python-4688252bd41082a0dd077b150b53834c0346cdb1.tar.gz | |
python: Support old buffer protocol when unpack. (experimental)
Diffstat (limited to 'python/test/test_sequnpack.py')
| -rw-r--r-- | python/test/test_sequnpack.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/python/test/test_sequnpack.py b/python/test/test_sequnpack.py index 789ccd2..df6e308 100644 --- a/python/test/test_sequnpack.py +++ b/python/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 |
