[pypy-commit] pypy win32-cleanup2: merge from default
mattip
noreply at buildbot.pypy.org
Mon Apr 23 12:55:22 CEST 2012
Author: Matti Picus <matti.picus at gmail.com>
Branch: win32-cleanup2
Changeset: r54667:9fa80f99cd1b
Date: 2012-04-23 13:54 +0300
http://bitbucket.org/pypy/pypy/changeset/9fa80f99cd1b/
Log: merge from default
diff --git a/pypy/module/cpyext/slotdefs.py b/pypy/module/cpyext/slotdefs.py
--- a/pypy/module/cpyext/slotdefs.py
+++ b/pypy/module/cpyext/slotdefs.py
@@ -65,8 +65,9 @@
check_num_args(space, w_args, 0)
args_w = space.fixedview(w_args)
res = generic_cpy_call(space, func_inquiry, w_self)
- if rffi.cast(lltype.Signed, res) == -1:
- space.fromcache(State).check_and_raise_exception(always=True)
+ res = rffi.cast(lltype.Signed, res)
+ if res == -1:
+ space.fromcache(State).check_and_raise_exception()
return space.wrap(bool(res))
def wrap_getattr(space, w_self, w_args, func):
diff --git a/pypy/module/micronumpy/test/test_numarray.py b/pypy/module/micronumpy/test/test_numarray.py
--- a/pypy/module/micronumpy/test/test_numarray.py
+++ b/pypy/module/micronumpy/test/test_numarray.py
@@ -1836,6 +1836,13 @@
a[a & 1 == 0] = 15
assert (a == [[15, 1], [15, 3], [15, 5], [15, 7], [15, 9]]).all()
+ def test_array_indexing_bool_setitem_2(self):
+ from _numpypy import arange
+ a = arange(10).reshape(5, 2)
+ a = a[::2]
+ a[a & 1 == 0] = 15
+ assert (a == [[15, 1], [15, 5], [15, 9]]).all()
+
def test_copy_kwarg(self):
from _numpypy import array
x = array([1, 2, 3])
diff --git a/pypy/pytest.ini b/pypy/pytest.ini
--- a/pypy/pytest.ini
+++ b/pypy/pytest.ini
@@ -1,2 +1,2 @@
[pytest]
-addopts = --assert=plain -rf
+addopts = --assert=reinterp -rf
diff --git a/pypy/tool/pytest/pypy_test_failure_demo.py b/pypy/tool/pytest/pypy_test_failure_demo.py
--- a/pypy/tool/pytest/pypy_test_failure_demo.py
+++ b/pypy/tool/pytest/pypy_test_failure_demo.py
@@ -8,6 +8,10 @@
def test_interp_func(space):
assert space.is_true(space.w_None)
+def test_interp_reinterpret(space):
+ a = 1
+ assert a == 2
+
class TestInterpTest:
def test_interp_method(self):
assert self.space.is_true(self.space.w_False)
More information about the pypy-commit
mailing list