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

Method test_lstrip

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

Source from the content-addressed store, hash-verified

401 assert_array_equal(self.B.lower(), tgt)
402
403 def test_lstrip(self):
404 tgt = [[b'abc ', b''],
405 [b'12345', b'MixedCase'],
406 [b'123 \t 345 \0 ', b'UPPER']]
407 assert_(issubclass(self.A.lstrip().dtype.type, np.bytes_))
408 assert_array_equal(self.A.lstrip(), tgt)
409
410 tgt = [[b' abc', b''],
411 [b'2345', b'ixedCase'],
412 [b'23 \t 345 \x00', b'UPPER']]
413 assert_array_equal(self.A.lstrip([b'1', b'M']), tgt)
414
415 tgt = [['\u03a3 ', ''],
416 ['12345', 'MixedCase'],
417 ['123 \t 345 \0 ', 'UPPER']]
418 assert_(issubclass(self.B.lstrip().dtype.type, np.str_))
419 assert_array_equal(self.B.lstrip(), tgt)
420
421 def test_partition(self):
422 P = self.A.partition([b'3', b'M'])

Callers

nothing calls this directly

Calls 3

assert_Function · 0.90
assert_array_equalFunction · 0.90
lstripMethod · 0.80

Tested by

no test coverage detected