summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/test_pack.py30
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"