From 85f04f426999d2c2eeac0bd9dc568246f8c03ab4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Tue, 2 May 2017 18:06:50 +0200 Subject: dev-python/webencodings: Clean old versions up --- .../files/webencodings-0.4-test-fix-backport.patch | 71 ---------------------- 1 file changed, 71 deletions(-) delete mode 100644 dev-python/webencodings/files/webencodings-0.4-test-fix-backport.patch (limited to 'dev-python/webencodings/files/webencodings-0.4-test-fix-backport.patch') diff --git a/dev-python/webencodings/files/webencodings-0.4-test-fix-backport.patch b/dev-python/webencodings/files/webencodings-0.4-test-fix-backport.patch deleted file mode 100644 index 4b42bb16e65e..000000000000 --- a/dev-python/webencodings/files/webencodings-0.4-test-fix-backport.patch +++ /dev/null @@ -1,71 +0,0 @@ -From 87044de0d2640cf9a8f941dec1fc79c679e7fa2d Mon Sep 17 00:00:00 2001 -From: Geoffrey Sneddon -Date: Sun, 17 Jan 2016 16:50:58 +0100 -Subject: [PATCH] Fix #2: get tests passing again after decode API change - ---- - webencodings/tests.py | 36 ++++++++++++++++++------------------ - 1 file changed, 18 insertions(+), 18 deletions(-) - -diff --git a/webencodings/tests.py b/webencodings/tests.py -index e0297d9..b8c5653 100644 ---- a/webencodings/tests.py -+++ b/webencodings/tests.py -@@ -47,7 +47,7 @@ def test_labels(): - - def test_all_labels(): - for label in LABELS: -- assert decode(b'', label) == '' -+ assert decode(b'', label) == ('', lookup(label)) - assert encode('', label) == b'' - for repeat in [0, 1, 12]: - output, _ = iter_decode([b''] * repeat, label) -@@ -74,25 +74,25 @@ def test_invalid_label(): - - - def test_decode(): -- assert decode(b'\x80', 'latin1') == '€' -- assert decode(b'\x80', lookup('latin1')) == '€' -- assert decode(b'\xc3\xa9', 'utf8') == 'é' -- assert decode(b'\xc3\xa9', UTF8) == 'é' -- assert decode(b'\xc3\xa9', 'ascii') == 'é' -- assert decode(b'\xEF\xBB\xBF\xc3\xa9', 'ascii') == 'é' # UTF-8 with BOM -+ assert decode(b'\x80', 'latin1') == ('€', lookup('latin1')) -+ assert decode(b'\x80', lookup('latin1')) == ('€', lookup('latin1')) -+ assert decode(b'\xc3\xa9', 'utf8') == ('é', lookup('utf8')) -+ assert decode(b'\xc3\xa9', UTF8) == ('é', lookup('utf8')) -+ assert decode(b'\xc3\xa9', 'ascii') == ('é', lookup('ascii')) -+ assert decode(b'\xEF\xBB\xBF\xc3\xa9', 'ascii') == ('é', lookup('utf8')) # UTF-8 with BOM - -- assert decode(b'\xFE\xFF\x00\xe9', 'ascii') == 'é' # UTF-16-BE with BOM -- assert decode(b'\xFF\xFE\xe9\x00', 'ascii') == 'é' # UTF-16-LE with BOM -- assert decode(b'\xFE\xFF\xe9\x00', 'ascii') == '\ue900' -- assert decode(b'\xFF\xFE\x00\xe9', 'ascii') == '\ue900' -+ assert decode(b'\xFE\xFF\x00\xe9', 'ascii') == ('é', lookup('utf-16be')) # UTF-16-BE with BOM -+ assert decode(b'\xFF\xFE\xe9\x00', 'ascii') == ('é', lookup('utf-16le')) # UTF-16-LE with BOM -+ assert decode(b'\xFE\xFF\xe9\x00', 'ascii') == ('\ue900', lookup('utf-16be')) -+ assert decode(b'\xFF\xFE\x00\xe9', 'ascii') == ('\ue900', lookup('utf-16le')) - -- assert decode(b'\x00\xe9', 'UTF-16BE') == 'é' -- assert decode(b'\xe9\x00', 'UTF-16LE') == 'é' -- assert decode(b'\xe9\x00', 'UTF-16') == 'é' -+ assert decode(b'\x00\xe9', 'UTF-16BE') == ('é', lookup('utf-16be')) -+ assert decode(b'\xe9\x00', 'UTF-16LE') == ('é', lookup('utf-16le')) -+ assert decode(b'\xe9\x00', 'UTF-16') == ('é', lookup('utf-16le')) - -- assert decode(b'\xe9\x00', 'UTF-16BE') == '\ue900' -- assert decode(b'\x00\xe9', 'UTF-16LE') == '\ue900' -- assert decode(b'\x00\xe9', 'UTF-16') == '\ue900' -+ assert decode(b'\xe9\x00', 'UTF-16BE') == ('\ue900', lookup('utf-16be')) -+ assert decode(b'\x00\xe9', 'UTF-16LE') == ('\ue900', lookup('utf-16le')) -+ assert decode(b'\x00\xe9', 'UTF-16') == ('\ue900', lookup('utf-16le')) - - - def test_encode(): -@@ -149,5 +149,5 @@ def test_x_user_defined(): - decoded = '2,\x0c\x0b\x1aO\uf7d9#\uf7cb\x0f\uf7c9\uf7bbt\uf7cf\uf7a8\uf7ca' - encoded = b'aa' - decoded = 'aa' -- assert decode(encoded, 'x-user-defined') == decoded -+ assert decode(encoded, 'x-user-defined') == (decoded, lookup('x-user-defined')) - assert encode(decoded, 'x-user-defined') == encoded -- cgit v1.2.3