summaryrefslogtreecommitdiff
path: root/test/test_unpack_raw.py
diff options
context:
space:
mode:
authorINADA Naoki <inada-n@klab.com>2012-12-29 11:24:25 +0900
committerINADA Naoki <inada-n@klab.com>2012-12-29 11:24:25 +0900
commit593c832ab00372b4a44dd47de94e4c2546fc1193 (patch)
treea24b9b2454f4fe30c2262f7839ec66c286036de6 /test/test_unpack_raw.py
parentd57e369258a388ee64ad900ee7e975da25ca36ec (diff)
downloadmsgpack-python-593c832ab00372b4a44dd47de94e4c2546fc1193.tar.gz
Use py.test instead of nosetests.
Diffstat (limited to 'test/test_unpack_raw.py')
-rw-r--r--test/test_unpack_raw.py17
1 files changed, 6 insertions, 11 deletions
diff --git a/test/test_unpack_raw.py b/test/test_unpack_raw.py
index 15d9c93..9f3784c 100644
--- a/test/test_unpack_raw.py
+++ b/test/test_unpack_raw.py
@@ -1,7 +1,5 @@
"""Tests for cases where the user seeks to obtain packed msgpack objects"""
-from nose import main
-from nose.tools import *
import six
from msgpack import Unpacker, packb
@@ -10,14 +8,14 @@ def test_write_bytes():
unpacker = Unpacker()
unpacker.feed(b'abc')
f = six.BytesIO()
- assert_equal(unpacker.unpack(f.write), ord('a'))
- assert_equal(f.getvalue(), b'a')
+ assert unpacker.unpack(f.write) == ord('a')
+ assert f.getvalue() == b'a'
f = six.BytesIO()
assert unpacker.skip(f.write) is None
- assert_equal(f.getvalue(), b'b')
+ assert f.getvalue() == b'b'
f = six.BytesIO()
assert unpacker.skip() is None
- assert_equal(f.getvalue(), b'')
+ assert f.getvalue() == b''
def test_write_bytes_multi_buffer():
@@ -27,8 +25,5 @@ def test_write_bytes_multi_buffer():
f = six.BytesIO()
unpacked = unpacker.unpack(f.write)
- assert_equal(unpacked, long_val)
- assert_equal(f.getvalue(), expected)
-
-if __name__ == '__main__':
- main()
+ assert unpacked == long_val
+ assert f.getvalue() == expected