MCPcopy Index your code
hub / github.com/numpy/numpy / test_rindex

Method test_rindex

numpy/_core/tests/test_defchararray.py:350–358  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

348 assert_array_equal(A.rfind(['1', 'P']), [[-1, -1], [0, -1], [0, 2]])
349
350 def test_rindex(self):
351 A = self.A()
352
353 def fail():
354 A.rindex('a')
355
356 assert_raises(ValueError, fail)
357 assert_(np.char.rindex('abcba', 'b') == 3)
358 assert_(issubclass(np.char.rindex('abcba', 'b').dtype.type, np.integer))
359
360 def test_startswith(self):
361 A = self.A()

Callers

nothing calls this directly

Calls 4

AMethod · 0.95
assert_raisesFunction · 0.90
assert_Function · 0.90
rindexMethod · 0.80

Tested by

no test coverage detected