]> granicus.if.org Git - python/commitdiff
Issue #19457: Fixed xmlcharrefreplace tests on wide build when tests are
authorSerhiy Storchaka <storchaka@gmail.com>
Thu, 31 Oct 2013 15:06:03 +0000 (17:06 +0200)
committerSerhiy Storchaka <storchaka@gmail.com>
Thu, 31 Oct 2013 15:06:03 +0000 (17:06 +0200)
loaded from .py[co] files.

Lib/test/test_codeccallbacks.py
Lib/test/test_unicode.py
Misc/NEWS

index ecaf9970a1ddbb72b3768dd9011828aa67e5ffb2..dbdb4f4507a365389b309174161c833969ba4b20 100644 (file)
@@ -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'),
index 666cab87255eaa9ee7cbd6a78a721feba3fc5a0a..925d25a15bd60a1b7e2e45b9fda0db982a991bb1 100644 (file)
@@ -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"),
index 71de138150e4aebc0f99673d49821ea4ba5c4cc3..f0b7d3703859f1a7e547c16ed629e6b221006ae3 100644 (file)
--- 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?
 ===========================