summaryrefslogtreecommitdiff
path: root/tests/test_unidecode.py
diff options
context:
space:
mode:
authorTomaz Solc <tomaz.solc@tablix.org>2015-05-14 10:45:16 +0200
committerTomaz Solc <tomaz.solc@tablix.org>2015-05-14 10:49:29 +0200
commitc48677633b95c99bb57f9afef7f0645a9c03a230 (patch)
treeac4ce7bed3eb20049d26d2eb3c807f60eea1f140 /tests/test_unidecode.py
parent3521ac0475e3e153a5bd9f662411ea5ce3718b6a (diff)
downloadunidecode-c48677633b95c99bb57f9afef7f0645a9c03a230.tar.gz
Fix surrogate test for Python 3.4
Diffstat (limited to 'tests/test_unidecode.py')
-rw-r--r--tests/test_unidecode.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/test_unidecode.py b/tests/test_unidecode.py
index 16cbc14..bc04f8a 100644
--- a/tests/test_unidecode.py
+++ b/tests/test_unidecode.py
@@ -120,7 +120,10 @@ class TestUnidecode(unittest.TestCase):
s_sp_2 = _u('\udce3')
s_sp = s_sp_1 + s_sp_2
- self.assertEqual(s.encode('utf16'), s_sp.encode('utf16'))
+ if sys.version_info < (3,4):
+ self.assertEqual(s.encode('utf16'), s_sp.encode('utf16'))
+ else:
+ self.assertEqual(s.encode('utf16'), s_sp.encode('utf16', errors='surrogatepass'))
wlog = WarningLogger()
wlog.start("Surrogate character")