From: Serhiy Storchaka Date: Thu, 31 Oct 2013 15:06:03 +0000 (+0200) Subject: Issue #19457: Fixed xmlcharrefreplace tests on wide build when tests are X-Git-Tag: v2.7.8~312 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1fdc7028617eefafe7a8f5848bcfdb91a2cc4987;p=python Issue #19457: Fixed xmlcharrefreplace tests on wide build when tests are loaded from .py[co] files. --- diff --git a/Lib/test/test_codeccallbacks.py b/Lib/test/test_codeccallbacks.py index ecaf9970a1..dbdb4f4507 100644 --- a/Lib/test/test_codeccallbacks.py +++ b/Lib/test/test_codeccallbacks.py @@ -84,9 +84,9 @@ class CodecCallbackTest(unittest.TestCase): tests = [(u'\U0001f49d', '💝'), (u'\ud83d', '�'), (u'\udc9d', '�'), - (u'\ud83d\udc9d', '💝' if len(u'\U0001f49d') > 1 else - '��'), ] + if u'\ud83d\udc9d' != u'\U0001f49d': + tests += [(u'\ud83d\udc9d', '��')] 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 666cab8725..925d25a15b 100644 --- a/Lib/test/test_unicode.py +++ b/Lib/test/test_unicode.py @@ -1663,9 +1663,9 @@ class UnicodeTest( tests = [(u'\U0001f49d', '💝'), (u'\ud83d', '�'), (u'\udc9d', '�'), - (u'\ud83d\udc9d', '💝' if len(u'\U0001f49d') > 1 else - '��'), ] + if u'\ud83d\udc9d' != u'\U0001f49d': + tests += [(u'\ud83d\udc9d', '��')] for s, exp in tests: self.assertEqual( unicode_encodedecimal(u"123" + s, "xmlcharrefreplace"), diff --git a/Misc/NEWS b/Misc/NEWS index 71de138150..f0b7d37038 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -12,6 +12,12 @@ Core and Builtins Library ------- +Tests +----- + +- Issue #19457: Fixed xmlcharrefreplace tests on wide build when tests are + loaded from .py[co] files. + Whats' New in Python 2.7.6? ===========================