[pypy-commit] pypy py3k: 2to3

mjacob pypy.commits at gmail.com
Mon Oct 3 01:56:31 EDT 2016


Author: Manuel Jacob <me at manueljacob.de>
Branch: py3k
Changeset: r87539:b7f4ac3cf6b2
Date: 2016-10-03 07:55 +0200
http://bitbucket.org/pypy/pypy/changeset/b7f4ac3cf6b2/

Log:	2to3

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
@@ -256,19 +256,13 @@
         assert b'one'.replace(memoryview(b'o'), memoryview(b'n')) == b'nne'
 
     def test_strip(self):
-        s = " a b "
-        assert s.strip() == "a b"
-        assert s.rstrip() == " a b"
-        assert s.lstrip() == "a b "
+        s = b" a b "
+        assert s.strip() == b"a b"
+        assert s.rstrip() == b" a b"
+        assert s.lstrip() == b"a b "
         assert b'xyzzyhelloxyzzy'.strip(b'xyz') == b'hello'
         assert b'xyzzyhelloxyzzy'.lstrip(b'xyz') == b'helloxyzzy'
         assert b'xyzzyhelloxyzzy'.rstrip(b'xyz') == b'xyzzyhello'
-        exc = raises(TypeError, s.strip, buffer(' '))
-        assert str(exc.value) == 'strip arg must be None, str or unicode'
-        exc = raises(TypeError, s.rstrip, buffer(' '))
-        assert str(exc.value) == 'strip arg must be None, str or unicode'
-        exc = raises(TypeError, s.lstrip, buffer(' '))
-        assert str(exc.value) == 'strip arg must be None, str or unicode'
 
     def test_zfill(self):
         assert b'123'.zfill(2) == b'123'


More information about the pypy-commit mailing list