[pypy-commit] pypy unicode-utf8-py3: merge unicode-utf8 into branch
mattip
pypy.commits at gmail.com
Mon Jan 14 23:43:23 EST 2019
Author: Matti Picus <matti.picus at gmail.com>
Branch: unicode-utf8-py3
Changeset: r95634:ce6f5d27b597
Date: 2019-01-15 06:42 +0200
http://bitbucket.org/pypy/pypy/changeset/ce6f5d27b597/
Log: merge unicode-utf8 into branch
diff --git a/pypy/objspace/std/test/test_unicodeobject.py b/pypy/objspace/std/test/test_unicodeobject.py
--- a/pypy/objspace/std/test/test_unicodeobject.py
+++ b/pypy/objspace/std/test/test_unicodeobject.py
@@ -338,6 +338,8 @@
assert u'A\u03a3A'.title() == u'A\u03c3a'
assert u"brow\u4321n fox".title() == u"Brow\u4321N Fox"
assert u'\ud800'.title() == u'\ud800'
+ assert (unichr(0x345) + u'abc').title() == u'\u0399Abc'
+ assert (unichr(0x345) + u'ABC').title() == u'\u0399Abc'
def test_istitle(self):
assert u"".istitle() == False
diff --git a/pypy/objspace/std/unicodeobject.py b/pypy/objspace/std/unicodeobject.py
--- a/pypy/objspace/std/unicodeobject.py
+++ b/pypy/objspace/std/unicodeobject.py
@@ -40,12 +40,6 @@
self._utf8 = utf8str
self._length = length
self._index_storage = rutf8.null_storage()
- # XXX checking, remove before any performance measurments
- # ifdef not_running_in_benchmark
- # if not we_are_translated():
- # print 'UnicodeObject.__init__'
- # lgt = rutf8.codepoints_in_utf8(utf8str)
- # assert lgt == length
@staticmethod
def from_utf8builder(builder):
More information about the pypy-commit
mailing list