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

Method test_split

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

Source from the content-addressed store, hash-verified

507 assert_array_equal(self.B.strip(), tgt)
508
509 def test_split(self):
510 A = self.A.split(b'3')
511 tgt = [
512 [[b' abc '], [b'']],
513 [[b'12', b'45'], [b'MixedCase']],
514 [[b'12', b' \t ', b'45 \x00 '], [b'UPPER']]]
515 assert_(issubclass(A.dtype.type, np.object_))
516 assert_equal(A.tolist(), tgt)
517
518 def test_splitlines(self):
519 A = np.char.array(['abc\nfds\nwer']).splitlines()

Callers

nothing calls this directly

Calls 4

assert_Function · 0.90
assert_equalFunction · 0.90
splitMethod · 0.45
tolistMethod · 0.45

Tested by

no test coverage detected