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

Method test_endswith

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

Source from the content-addressed store, hash-verified

228 # assert_array_equal(self.B.count('\0'), [[0, 0], [0, 0], [1, 0]])
229
230 def test_endswith(self):
231 assert_(issubclass(self.A.endswith('').dtype.type, np.bool_))
232 assert_array_equal(self.A.endswith(' '), [[1, 0], [0, 0], [1, 0]])
233 assert_array_equal(self.A.endswith('3', 0, 3), [[0, 0], [1, 0], [1, 0]])
234
235 def fail():
236 self.A.endswith('3', 'fdjk')
237
238 assert_raises(TypeError, fail)
239
240 def test_find(self):
241 assert_(issubclass(self.A.find('a').dtype.type, np.integer))

Callers

nothing calls this directly

Calls 4

assert_Function · 0.90
assert_array_equalFunction · 0.90
assert_raisesFunction · 0.90
endswithMethod · 0.80

Tested by

no test coverage detected