[pypy-commit] pypy py3.3: Add a test case for 0ae2fcdca348.
mjacob
noreply at buildbot.pypy.org
Tue Feb 24 13:04:41 CET 2015
Author: Manuel Jacob <me at manueljacob.de>
Branch: py3.3
Changeset: r76096:575325d6c64c
Date: 2015-02-24 13:04 +0100
http://bitbucket.org/pypy/pypy/changeset/575325d6c64c/
Log: Add a test case for 0ae2fcdca348.
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
@@ -695,6 +695,10 @@
assert 'hello'.encode() == b'hello'
assert type('hello'.encode()) is bytes
+ def test_non_text_encoding(self):
+ raises(LookupError, b'hello'.decode, 'base64')
+ raises(LookupError, 'hello'.encode, 'base64')
+
def test_hash(self):
# check that we have the same hash as CPython for at least 31 bits
# (but don't go checking CPython's special case -1)
More information about the pypy-commit
mailing list