[pypy-svn] pypy default: Fix test by ensuring that a unicode string is returned in all cases
amauryfa
commits-noreply at bitbucket.org
Tue Jan 25 08:50:07 CET 2011
Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch:
Changeset: r41287:dbe7301c8e6b
Date: 2011-01-25 08:47 +0100
http://bitbucket.org/pypy/pypy/changeset/dbe7301c8e6b/
Log: Fix test by ensuring that a unicode string is returned in all cases
(code_to_unichr may be annotated to return a single UniChar)
diff --git a/pypy/module/unicodedata/test/test_unicodedata.py b/pypy/module/unicodedata/test/test_unicodedata.py
--- a/pypy/module/unicodedata/test/test_unicodedata.py
+++ b/pypy/module/unicodedata/test/test_unicodedata.py
@@ -192,7 +192,9 @@
def test_code_to_unichr(self):
from pypy.module.unicodedata.interp_ucd import code_to_unichr
- res = self.ll_to_unicode(self.interpret(code_to_unichr, [0x10346]))
+ def f(c):
+ return code_to_unichr(c) + u''
+ res = self.ll_to_unicode(self.interpret(f, [0x10346]))
assert res == u'\U00010346'
More information about the Pypy-commit
mailing list