Commits

Brian Kearns  committed 04050eb

test/fix another ndarray exception

  • Participants
  • Parent commits bc9dfce

Comments (0)

Files changed (2)

File pypy/module/micronumpy/arrayimpl/concrete.py

 
 class NonWritableArray(ConcreteArray):
     def descr_setitem(self, space, orig_array, w_index, w_value):
-        raise OperationError(space.w_RuntimeError, space.wrap(
-            "array is not writable"))
+        raise OperationError(space.w_ValueError, space.wrap(
+            "assignment destination is read-only"))
 
 
 class SliceArray(BaseConcreteArray):

File pypy/module/micronumpy/test/test_numarray.py

         assert a[5] == 50
         b = a.imag
         assert b[7] == 0
-        raises(RuntimeError, 'b[7] = -2')
+        raises(ValueError, 'b[7] = -2')
         raises(TypeError, 'a.imag = -2')
         a = array(['abc','def'],dtype='S3')
         b = a.real