MCPcopy
hub / github.com/numpy/numpy / test_lstrip

Method test_lstrip

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

Source from the content-addressed store, hash-verified

469 assert_array_equal(B.lower(), tgt)
470
471 def test_lstrip(self):
472 A, B = self.A(), self.B()
473 tgt = [[b'abc ', b''],
474 [b'12345', b'MixedCase'],
475 [b'123 \t 345 \0 ', b'UPPER']]
476 assert_(issubclass(A.lstrip().dtype.type, np.bytes_))
477 assert_array_equal(A.lstrip(), tgt)
478
479 tgt = [[b' abc', b''],
480 [b'2345', b'ixedCase'],
481 [b'23 \t 345 \x00', b'UPPER']]
482 assert_array_equal(A.lstrip([b'1', b'M']), tgt)
483
484 tgt = [['\u03a3 ', ''],
485 ['12345', 'MixedCase'],
486 ['123 \t 345 \0 ', 'UPPER']]
487 assert_(issubclass(B.lstrip().dtype.type, np.str_))
488 assert_array_equal(B.lstrip(), tgt)
489
490 def test_partition(self):
491 A = self.A()

Callers

nothing calls this directly

Calls 5

AMethod · 0.95
BMethod · 0.95
assert_Function · 0.90
assert_array_equalFunction · 0.90
lstripMethod · 0.80

Tested by

no test coverage detected