summaryrefslogtreecommitdiff
path: root/test/test_sequnpack.py
diff options
context:
space:
mode:
authorINADA Naoki <songofacandy@gmail.com>2012-06-19 14:20:56 +0900
committerINADA Naoki <songofacandy@gmail.com>2012-06-19 14:20:56 +0900
commit636f4529aa8426f4ee3e25e0b4931bb37384df1e (patch)
tree4ed83eea4ae197c61cd3793305fc7856fbb8e6f8 /test/test_sequnpack.py
parent0b38e86534130f625cbea2f9446e8e52ef5f5a06 (diff)
downloadmsgpack-python-636f4529aa8426f4ee3e25e0b4931bb37384df1e.tar.gz
Fix tests to pass.
Diffstat (limited to 'test/test_sequnpack.py')
-rw-r--r--test/test_sequnpack.py14
1 files changed, 5 insertions, 9 deletions
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')