[pypy-commit] pypy py3k: switch to py3's error message
pjenvey
noreply at buildbot.pypy.org
Wed May 7 02:03:33 CEST 2014
Author: Philip Jenvey <pjenvey at underboss.org>
Branch: py3k
Changeset: r71356:98a0ff61e8d0
Date: 2014-05-06 17:01 -0700
http://bitbucket.org/pypy/pypy/changeset/98a0ff61e8d0/
Log: switch to py3's error message
diff --git a/pypy/module/__builtin__/test/test_builtin.py b/pypy/module/__builtin__/test/test_builtin.py
--- a/pypy/module/__builtin__/test/test_builtin.py
+++ b/pypy/module/__builtin__/test/test_builtin.py
@@ -99,7 +99,7 @@
def __int__(self):
return 42
exc = raises(TypeError, bin, D())
- assert "index" in str(exc.value)
+ assert "integer" in str(exc.value)
def test_oct(self):
class Foo:
diff --git a/pypy/module/operator/test/test_operator.py b/pypy/module/operator/test/test_operator.py
--- a/pypy/module/operator/test/test_operator.py
+++ b/pypy/module/operator/test/test_operator.py
@@ -180,7 +180,7 @@
assert operator.__index__(42) == 42
raises(TypeError, operator.index, "abc")
exc = raises(TypeError, operator.index, "abc")
- assert str(exc.value) == "'str' object cannot be interpreted as an index"
+ assert str(exc.value) == "'str' object cannot be interpreted as an integer"
def test_indexOf(self):
import operator
diff --git a/pypy/objspace/descroperation.py b/pypy/objspace/descroperation.py
--- a/pypy/objspace/descroperation.py
+++ b/pypy/objspace/descroperation.py
@@ -633,7 +633,7 @@
for x in checkerspec]
checker = " or ".join(l)
if targetname == 'index':
- msg = "'%%T' object cannot be interpreted as an index"
+ msg = "'%%T' object cannot be interpreted as an integer"
else:
msg = "unsupported operand type for %(targetname)s(): '%%T'"
msg = msg % locals()
More information about the pypy-commit
mailing list