[pypy-commit] pypy default: Fix test: missing incref

rlamy pypy.commits at gmail.com
Sun Dec 17 08:23:22 EST 2017


Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: 
Changeset: r93448:a560a9381f17
Date: 2017-12-17 13:22 +0000
http://bitbucket.org/pypy/pypy/changeset/a560a9381f17/

Log:	Fix test: missing incref

diff --git a/pypy/module/cpyext/test/test_tupleobject.py b/pypy/module/cpyext/test/test_tupleobject.py
--- a/pypy/module/cpyext/test/test_tupleobject.py
+++ b/pypy/module/cpyext/test/test_tupleobject.py
@@ -1,6 +1,7 @@
 import py
 
-from pypy.module.cpyext.pyobject import PyObject, PyObjectP, make_ref, from_ref
+from pypy.module.cpyext.pyobject import (
+    PyObject, PyObjectP, make_ref, from_ref, incref)
 from pypy.module.cpyext.test.test_api import BaseApiTest, raises_w
 from pypy.module.cpyext.test.test_cpyext import AppTestCpythonExtensionBase
 from rpython.rtyper.lltypesystem import rffi, lltype
@@ -14,6 +15,7 @@
     def test_tupleobject(self, space):
         assert not PyTuple_Check(space, space.w_None)
         with raises_w(space, SystemError):
+            incref(space, space.w_None)
             PyTuple_SetItem(space, space.w_None, 0, space.w_None)
         atuple = space.newtuple([space.wrap(0), space.wrap(1),
                                  space.wrap('yay')])


More information about the pypy-commit mailing list