MCPcopy Create free account
hub / github.com/numpy/numpy / testSetBad2

Method testSetBad2

tools/swig/test/testArray.py:219–222  ·  view source on GitHub ↗

Test Array2 __setitem__ method, out-of-range index

(self)

Source from the content-addressed store, hash-verified

217 self.assertRaises(IndexError, self.array2.__setitem__, -1, a)
218
219 def testSetBad2(self):
220 "Test Array2 __setitem__ method, out-of-range index"
221 a = Array.Array1(self.ncols)
222 self.assertRaises(IndexError, self.array2.__setitem__, self.nrows+1, a)
223
224 def testGetBad1(self):
225 "Test Array2 __getitem__ method, negative index"

Callers

nothing calls this directly

Calls 1

Array1Method · 0.80

Tested by

no test coverage detected