[pypy-commit] pypy py3k-refactor-str-types: we follow the more consistent py33 behavior now

pjenvey noreply at buildbot.pypy.org
Fri Jan 24 21:20:08 CET 2014


Author: Philip Jenvey <pjenvey at underboss.org>
Branch: py3k-refactor-str-types
Changeset: r68914:20ec3039a327
Date: 2014-01-24 11:52 -0800
http://bitbucket.org/pypy/pypy/changeset/20ec3039a327/

Log:	we follow the more consistent py33 behavior now

diff --git a/pypy/objspace/std/test/test_bytesobject.py b/pypy/objspace/std/test/test_bytesobject.py
--- a/pypy/objspace/std/test/test_bytesobject.py
+++ b/pypy/objspace/std/test/test_bytesobject.py
@@ -203,10 +203,10 @@
         assert b'abc'.rjust(5, b'*') == b'**abc'     # Python 2.4
         assert b'abc'.rjust(0) == b'abc'
         assert b'abc'.rjust(-1) == b'abc'
+        assert b'abc'.rjust(5, bytearray(b' ')) == b'  abc'
         raises(TypeError, b'abc'.rjust, 5.0)
         raises(TypeError, b'abc'.rjust, 5, '*')
         raises(TypeError, b'abc'.rjust, 5, b'xx')
-        raises(TypeError, b'abc'.rjust, 5, bytearray(b' '))
         raises(TypeError, b'abc'.rjust, 5, 32)
 
     def test_ljust(self):
@@ -290,8 +290,8 @@
         assert b'abc'.center(5, b'*') == b'*abc*'     # Python 2.4
         assert b'abc'.center(0) == b'abc'
         assert b'abc'.center(-1) == b'abc'
+        assert b'abc'.center(5, bytearray(b' ')) == b' abc '
         raises(TypeError, b'abc'.center, 4, b'cba')
-        raises(TypeError, b'abc'.center, 5, bytearray(b' '))
         assert b' abc'.center(7) == b'   abc '
 
     def test_count(self):


More information about the pypy-commit mailing list