diff options
author | inada-n <inada-n@sag16.klab.org> | 2011-06-01 18:30:43 +0900 |
---|---|---|
committer | inada-n <inada-n@sag16.klab.org> | 2011-06-01 18:30:43 +0900 |
commit | ff594d71dd85661e6307a9cca6ed184227e1dd35 (patch) | |
tree | f64101fe2b49fd930e95297edb91014124c5471e /test/test_sequnpack.py | |
parent | 3ffc75928bfe5b5cf232de996a01436cb4064f65 (diff) | |
download | msgpack-python-ff594d71dd85661e6307a9cca6ed184227e1dd35.tar.gz |
(python) make test pass with Python 2.5
Diffstat (limited to 'test/test_sequnpack.py')
-rw-r--r-- | test/test_sequnpack.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/test/test_sequnpack.py b/test/test_sequnpack.py index c92658c..d61be23 100644 --- a/test/test_sequnpack.py +++ b/test/test_sequnpack.py @@ -6,12 +6,12 @@ from msgpack import Unpacker def test_foobar(): unpacker = Unpacker(read_size=3) unpacker.feed('foobar') - 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') + 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') try: o = unpacker.unpack() print "Oops!", o @@ -20,14 +20,14 @@ def test_foobar(): assert 1 else: assert 0 - unpacker.feed(b'foo') - unpacker.feed(b'bar') + unpacker.feed('foo') + unpacker.feed('bar') k = 0 - for o, e in zip(unpacker, b'foobarbaz'): + for o, e in zip(unpacker, 'foobarbaz'): assert o == ord(e) k += 1 - assert k == len(b'foobar') + assert k == len('foobar') if __name__ == '__main__': test_foobar() |