Author: fijal
Branch: unicode-utf8
Changeset: r90462:50905f927559
Date: 2017-03-01 19:31 +0100
http://bitbucket.org/pypy/pypy/changeset/50905f927559/
Log: improve the tests
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
@@ -100,6 +100,8 @@
assert u'\n\n'.splitlines() == [u'', u'']
assert u'a\nb\nc'.splitlines(1) == [u'a\n', u'b\n', u'c']
assert u'\na\nb\n'.splitlines(1) == [u'\n', u'a\n', u'b\n']
+ assert ((u'a' + '\xc2\x85'.decode('utf8') + u'b\n').splitlines() ==
+ ['a', 'b'])
def test_zfill(self):
assert u'123'.zfill(2) == u'123'
@@ -176,6 +178,7 @@
raises(ValueError, 'abc'.rsplit, u'')
assert u' a b c '.rsplit(None, 0) == [u' a b c']
assert u''.rsplit('aaa') == [u'']
+ assert u'a\nb\u1680c'.rsplit() == [u'a', u'b', u'c']
def test_split_rsplit_str_unicode(self):
x = 'abc'.split(u'b')
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit