diff options
author | Inada Naoki <songofacandy@gmail.com> | 2019-12-03 18:54:01 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-03 18:54:01 +0900 |
commit | e1ed0044bf31dc0d6ef951f6298de4f420170968 (patch) | |
tree | e12172aafa58a61cf555ed20a5d5ac7f9aa22dfc /test | |
parent | cc3a8665d6210e933bcfb9120bd0ceb15224f03e (diff) | |
download | msgpack-python-e1ed0044bf31dc0d6ef951f6298de4f420170968.tar.gz |
Remove encoding/unicode_errors options from Packer (#378)
Diffstat (limited to 'test')
-rw-r--r-- | test/test_pack.py | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/test/test_pack.py b/test/test_pack.py index 3658a97..194b2c9 100644 --- a/test/test_pack.py +++ b/test/test_pack.py @@ -40,21 +40,6 @@ def testPackUnicode(): re = Unpacker(BytesIO(data), raw=False, use_list=1).unpack() assert re == td -def testPackUTF32(): # deprecated - try: - test_data = [ - "", - "abcd", - ["defgh"], - "Русский текст", - ] - for td in test_data: - with pytest.deprecated_call(): - re = unpackb(packb(td, encoding='utf-32'), use_list=1, encoding='utf-32') - assert re == td - except LookupError as e: - xfail(e) - def testPackBytes(): test_data = [ b"", b"abcd", (b"defgh",), @@ -69,26 +54,11 @@ def testPackByteArrays(): for td in test_data: check(td) -def testIgnoreUnicodeErrors(): # deprecated - with pytest.deprecated_call(): - re = unpackb(packb(b'abc\xeddef'), encoding='utf-8', unicode_errors='ignore', use_list=1) - assert re == "abcdef" - def testStrictUnicodeUnpack(): packed = packb(b'abc\xeddef') with pytest.raises(UnicodeDecodeError): unpackb(packed, raw=False, use_list=1) -def testStrictUnicodePack(): # deprecated - with raises(UnicodeEncodeError): - with pytest.deprecated_call(): - packb("abc\xeddef", encoding='ascii', unicode_errors='strict') - -def testIgnoreErrorsPack(): # deprecated - with pytest.deprecated_call(): - re = unpackb(packb("abcФФФdef", encoding='ascii', unicode_errors='ignore'), raw=False, use_list=1) - assert re == "abcdef" - def testDecodeBinary(): re = unpackb(packb(b"abc"), encoding=None, use_list=1) assert re == b"abc" |