[Python-checkins] cpython (2.7): fix xmlcharrefreplace tests on wide build when tests are loaded from .py[co]
benjamin.peterson
python-checkins at python.org
Fri Nov 1 01:24:12 CET 2013
http://hg.python.org/cpython/rev/2d02b7a97e0b
changeset: 86817:2d02b7a97e0b
branch: 2.7
parent: 86775:e4fe8fcaef0d
user: Benjamin Peterson <benjamin at python.org>
date: Thu Oct 31 20:22:41 2013 -0400
summary:
fix xmlcharrefreplace tests on wide build when tests are loaded from .py[co] files.
files:
Lib/test/test_codeccallbacks.py | 4 ++--
Lib/test/test_unicode.py | 4 ++--
Misc/NEWS | 6 ++++++
3 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/Lib/test/test_codeccallbacks.py b/Lib/test/test_codeccallbacks.py
--- a/Lib/test/test_codeccallbacks.py
+++ b/Lib/test/test_codeccallbacks.py
@@ -84,9 +84,9 @@
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
--- a/Lib/test/test_unicode.py
+++ b/Lib/test/test_unicode.py
@@ -1663,9 +1663,9 @@
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
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -16,6 +16,12 @@
- Issue #19426: Fixed the opening of Python source file with specified encoding.
+Tests
+-----
+
+- Issue #19457: Fixed xmlcharrefreplace tests on wide build when tests are
+ loaded from .py[co] files.
+
What's New in Python 2.7.6 release candidate 1?
===============================================
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list