Author: Antonio Cuni <[email protected]>
Branch: py3k
Changeset: r54514:f215b274d3e1
Date: 2012-04-19 09:49 +0200
http://bitbucket.org/pypy/pypy/changeset/f215b274d3e1/
Log: slight differences between py2 and py3k wrt chars and unicodes
diff --git a/pypy/objspace/std/test/test_stringformat.py
b/pypy/objspace/std/test/test_stringformat.py
--- a/pypy/objspace/std/test/test_stringformat.py
+++ b/pypy/objspace/std/test/test_stringformat.py
@@ -176,9 +176,10 @@
e = 'e'
assert '%c' % A == 'A'
assert '%c' % e == 'e'
- raises(OverflowError, '%c'.__mod__, (256,))
+ #raises(OverflowError, '%c'.__mod__, (256,)) # py2
+ assert '%c' % 256 == '\u0100' # py3k
raises(OverflowError, '%c'.__mod__, (-1,))
- raises(OverflowError, u'%c'.__mod__, (sys.maxunicode+1,))
+ raises(OverflowError, '%c'.__mod__, (sys.maxunicode+1,))
raises(TypeError, '%c'.__mod__, ("bla",))
raises(TypeError, '%c'.__mod__, ("",))
raises(TypeError, '%c'.__mod__, (['c'],))
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit