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

Method testSetBad1

tools/swig/test/testArray.py:214–217  ·  view source on GitHub ↗

Test Array2 __setitem__ method, negative index

(self)

Source from the content-addressed store, hash-verified

212 self.assertTrue(self.array2[i][j] == i*j)
213
214 def testSetBad1(self):
215 "Test Array2 __setitem__ method, negative index"
216 a = Array.Array1(self.ncols)
217 self.assertRaises(IndexError, self.array2.__setitem__, -1, a)
218
219 def testSetBad2(self):
220 "Test Array2 __setitem__ method, out-of-range index"

Callers

nothing calls this directly

Calls 1

Array1Method · 0.80

Tested by

no test coverage detected