From 636f4529aa8426f4ee3e25e0b4931bb37384df1e Mon Sep 17 00:00:00 2001 From: INADA Naoki Date: Tue, 19 Jun 2012 14:20:56 +0900 Subject: Fix tests to pass. --- test/test_sequnpack.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'test/test_sequnpack.py') diff --git a/test/test_sequnpack.py b/test/test_sequnpack.py index 5fd377c..774fe1b 100644 --- a/test/test_sequnpack.py +++ b/test/test_sequnpack.py @@ -1,8 +1,6 @@ #!/usr/bin/env python # coding: utf-8 - - from msgpack import Unpacker def test_foobar(): @@ -16,18 +14,16 @@ def test_foobar(): assert unpacker.unpack() == ord(b'r') try: o = unpacker.unpack() - print(("Oops!", o)) - assert 0 + assert 0, "should raise exception" except StopIteration: - assert 1 - else: - assert 0 + assert 1, "ok" + unpacker.feed(b'foo') unpacker.feed(b'bar') k = 0 - for o, e in zip(unpacker, b'foobarbaz'): - assert o == e + for o, e in zip(unpacker, 'foobarbaz'): + assert o == ord(e) k += 1 assert k == len(b'foobar') -- cgit v1.2.1