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

Method test_partition

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

Source from the content-addressed store, hash-verified

419 assert_array_equal(self.B.lstrip(), tgt)
420
421 def test_partition(self):
422 P = self.A.partition([b'3', b'M'])
423 tgt = [[(b' abc ', b'', b''), (b'', b'', b'')],
424 [(b'12', b'3', b'45'), (b'', b'M', b'ixedCase')],
425 [(b'12', b'3', b' \t 345 \0 '), (b'UPPER', b'', b'')]]
426 assert_(issubclass(P.dtype.type, np.bytes_))
427 assert_array_equal(P, tgt)
428
429 def test_replace(self):
430 R = self.A.replace([b'3', b'a'],

Callers

nothing calls this directly

Calls 3

assert_Function · 0.90
assert_array_equalFunction · 0.90
partitionMethod · 0.45

Tested by

no test coverage detected