summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2013-10-31 15:06:03 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2013-10-31 15:06:03 (GMT)
commit1fdc7028617eefafe7a8f5848bcfdb91a2cc4987 (patch)
treea03ff5c1b11153fa6bd7e407b8919c2082bd6e29 /Lib/test
parent41e9b401dc25418ecdfd4f525ecc7a47eea3df39 (diff)
downloadcpython-1fdc7028617eefafe7a8f5848bcfdb91a2cc4987.zip
cpython-1fdc7028617eefafe7a8f5848bcfdb91a2cc4987.tar.gz
cpython-1fdc7028617eefafe7a8f5848bcfdb91a2cc4987.tar.bz2
Issue #19457: Fixed xmlcharrefreplace tests on wide build when tests are
loaded from .py[co] files.
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_codeccallbacks.py4
-rw-r--r--Lib/test/test_unicode.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_codeccallbacks.py b/Lib/test/test_codeccallbacks.py
index ecaf997..dbdb4f4 100644
--- a/Lib/test/test_codeccallbacks.py
+++ b/Lib/test/test_codeccallbacks.py
@@ -84,9 +84,9 @@ class CodecCallbackTest(unittest.TestCase):
tests = [(u'\U0001f49d', '&#128157;'),
(u'\ud83d', '&#55357;'),
(u'\udc9d', '&#56477;'),
- (u'\ud83d\udc9d', '&#128157;' if len(u'\U0001f49d') > 1 else
- '&#55357;&#56477;'),
]
+ if u'\ud83d\udc9d' != u'\U0001f49d':
+ tests += [(u'\ud83d\udc9d', '&#55357;&#56477;')]
for encoding in ['ascii', 'latin1', 'iso-8859-15']:
for s, exp in tests:
self.assertEqual(s.encode(encoding, 'xmlcharrefreplace'),
diff --git a/Lib/test/test_unicode.py b/Lib/test/test_unicode.py
index 666cab8..925d25a 100644
--- a/Lib/test/test_unicode.py
+++ b/Lib/test/test_unicode.py
@@ -1663,9 +1663,9 @@ class UnicodeTest(
tests = [(u'\U0001f49d', '&#128157;'),
(u'\ud83d', '&#55357;'),
(u'\udc9d', '&#56477;'),
- (u'\ud83d\udc9d', '&#128157;' if len(u'\U0001f49d') > 1 else
- '&#55357;&#56477;'),
]
+ if u'\ud83d\udc9d' != u'\U0001f49d':
+ tests += [(u'\ud83d\udc9d', '&#55357;&#56477;')]
for s, exp in tests:
self.assertEqual(
unicode_encodedecimal(u"123" + s, "xmlcharrefreplace"),