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

Method test_rindex

numpy/core/tests/test_defchararray.py:291–298  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

289 assert_array_equal(self.A.rfind(['1', 'P']), [[-1, -1], [0, -1], [0, 2]])
290
291 def test_rindex(self):
292
293 def fail():
294 self.A.rindex('a')
295
296 assert_raises(ValueError, fail)
297 assert_(np.char.rindex('abcba', 'b') == 3)
298 assert_(issubclass(np.char.rindex('abcba', 'b').dtype.type, np.integer))
299
300 def test_startswith(self):
301 assert_(issubclass(self.A.startswith('').dtype.type, np.bool_))

Callers

nothing calls this directly

Calls 3

assert_raisesFunction · 0.90
assert_Function · 0.90
rindexMethod · 0.80

Tested by

no test coverage detected