Skip to content

Commit 3304cd5

Browse files
mattipShaneHarvey
authored andcommitted
PYTHON-2987 Fix test unicode repr on PyPy 7.3.7 (#770)
(cherry picked from commit 695a90e)
1 parent 6373203 commit 3304cd5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/test_errors.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,9 @@ def _test_unicode_strs(self, exc):
4949
if sys.version_info[0] == 2:
5050
self.assertEqual("unicode \xf0\x9f\x90\x8d, full error: {"
5151
"'errmsg': u'unicode \\U0001f40d'}", str(exc))
52-
elif 'PyPy' in sys.version:
53-
# PyPy displays unicode in repr differently.
52+
elif (sys.implementation.name == 'pypy' and
53+
sys.implementation.version < (7, 3, 7)):
54+
# PyPy used to display unicode in repr differently.
5455
self.assertEqual("unicode \U0001f40d, full error: {"
5556
"'errmsg': 'unicode \\U0001f40d'}", str(exc))
5657
else:

0 commit comments

Comments
 (0)