[pypy-svn] r50238 - pypy/branch/ghop-ropes-classes/pypy/rlib/test
cfbolz at codespeak.net
cfbolz at codespeak.net
Mon Dec 31 19:36:20 CET 2007
Author: cfbolz
Date: Mon Dec 31 19:36:18 2007
New Revision: 50238
Modified:
pypy/branch/ghop-ropes-classes/pypy/rlib/test/test_ropewrapper.py
Log:
check that type coercion raises a proper error
Modified: pypy/branch/ghop-ropes-classes/pypy/rlib/test/test_ropewrapper.py
==============================================================================
--- pypy/branch/ghop-ropes-classes/pypy/rlib/test/test_ropewrapper.py (original)
+++ pypy/branch/ghop-ropes-classes/pypy/rlib/test/test_ropewrapper.py Mon Dec 31 19:36:18 2007
@@ -103,6 +103,11 @@
assert isinstance(s, self.constunicode)
assert s == self.constunicode("defabc")
+ def test_add_coercion_decodes(self):
+ s1 = self.conststr("\xff")
+ s2 = self.constunicode("a")
+ py.test.raises(UnicodeDecodeError, "s1 + s2")
+
class TestPythonCoercion(AbstractTestCoercion):
conststr = str
constunicode = unicode
More information about the Pypy-commit
mailing list