diff options
| author | Tomaz Solc <tomaz.solc@tablix.org> | 2015-05-14 10:45:16 +0200 |
|---|---|---|
| committer | Tomaz Solc <tomaz.solc@tablix.org> | 2015-05-14 10:49:29 +0200 |
| commit | c48677633b95c99bb57f9afef7f0645a9c03a230 (patch) | |
| tree | ac4ce7bed3eb20049d26d2eb3c807f60eea1f140 /tests/test_unidecode.py | |
| parent | 3521ac0475e3e153a5bd9f662411ea5ce3718b6a (diff) | |
| download | unidecode-c48677633b95c99bb57f9afef7f0645a9c03a230.tar.gz | |
Fix surrogate test for Python 3.4
Diffstat (limited to 'tests/test_unidecode.py')
| -rw-r--r-- | tests/test_unidecode.py | 5 |
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") |
