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

Method test_split

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

Source from the content-addressed store, hash-verified

626 assert_array_equal(B.strip(), tgt)
627
628 def test_split(self):
629 A = self.A().split(b'3')
630 tgt = [
631 [[b' abc '], [b'']],
632 [[b'12', b'45'], [b'MixedCase']],
633 [[b'12', b' \t ', b'45 \x00 '], [b'UPPER']]]
634 assert_(issubclass(A.dtype.type, np.object_))
635 assert_equal(A.tolist(), tgt)
636
637 def test_splitlines(self):
638 A = np.char.array(['abc\nfds\nwer']).splitlines()

Callers

nothing calls this directly

Calls 5

AMethod · 0.95
assert_Function · 0.90
assert_equalFunction · 0.90
splitMethod · 0.80
tolistMethod · 0.45

Tested by

no test coverage detected