[pypy-commit] pypy oefmt: fix

pjenvey pypy.commits at gmail.com
Mon May 2 02:55:17 EDT 2016


Author: Philip Jenvey <pjenvey at underboss.org>
Branch: oefmt
Changeset: r84123:c665430f23c3
Date: 2016-05-01 23:54 -0700
http://bitbucket.org/pypy/pypy/changeset/c665430f23c3/

Log:	fix

diff --git a/pypy/module/cpyext/methodobject.py b/pypy/module/cpyext/methodobject.py
--- a/pypy/module/cpyext/methodobject.py
+++ b/pypy/module/cpyext/methodobject.py
@@ -85,7 +85,7 @@
             if length == 0:
                 return generic_cpy_call(space, func, w_self, None)
             raise oefmt(space.w_TypeError,
-                        "() takes no arguments", self.name)
+                        "%s() takes no arguments", self.name)
         elif flags & METH_O:
             if length != 1:
                 raise oefmt(space.w_TypeError,
diff --git a/pypy/module/cpyext/test/test_sequence.py b/pypy/module/cpyext/test/test_sequence.py
--- a/pypy/module/cpyext/test/test_sequence.py
+++ b/pypy/module/cpyext/test/test_sequence.py
@@ -163,7 +163,7 @@
         assert space.int_w(space.getitem(w_l, space.wrap(1))) == 2
         assert space.int_w(space.getitem(w_l, space.wrap(0))) == 1
         e = py.test.raises(OperationError, space.getitem, w_l, space.wrap(15))
-        assert "list index out of range" in e.exconly()
+        assert "list index out of range" in e.value.errorstr(space)
         assert space.int_w(space.getitem(w_l, space.wrap(-1))) == 4
         space.setitem(w_l, space.wrap(1), space.wrap(13))
         assert space.int_w(space.getitem(w_l, space.wrap(1))) == 13


More information about the pypy-commit mailing list