[pypy-commit] pypy default: More tests.
arigo
noreply at buildbot.pypy.org
Tue Sep 6 06:37:13 CEST 2011
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r47098:5d1b417d7c94
Date: 2011-09-06 06:35 +0200
http://bitbucket.org/pypy/pypy/changeset/5d1b417d7c94/
Log: More tests.
diff --git a/pypy/interpreter/test/test_exec.py b/pypy/interpreter/test/test_exec.py
--- a/pypy/interpreter/test/test_exec.py
+++ b/pypy/interpreter/test/test_exec.py
@@ -233,3 +233,16 @@
assert ord(x[3]) == 0x043a
assert ord(x[4]) == 0x0435
assert ord(x[5]) == 0x043d
+
+ def test_eval_unicode(self):
+ u = "u'%s'" % unichr(0x1234)
+ v = eval(u)
+ assert v == unichr(0x1234)
+
+ def test_compile_unicode(self):
+ s = "x = u'\xd0\xb9\xd1\x86\xd1\x83\xd0\xba\xd0\xb5\xd0\xbd'"
+ u = s.decode('utf-8')
+ c = compile(u, '<input>', 'exec')
+ exec c
+ assert len(x) == 6
+ assert ord(x[0]) == 0x0439
More information about the pypy-commit
mailing list