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

Method test_replace

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

Source from the content-addressed store, hash-verified

427 assert_array_equal(P, tgt)
428
429 def test_replace(self):
430 R = self.A.replace([b'3', b'a'],
431 [b'##########', b'@'])
432 tgt = [[b' abc ', b''],
433 [b'12##########45', b'MixedC@se'],
434 [b'12########## \t ##########45 \x00', b'UPPER']]
435 assert_(issubclass(R.dtype.type, np.bytes_))
436 assert_array_equal(R, tgt)
437
438 def test_rjust(self):
439 assert_(issubclass(self.A.rjust(10).dtype.type, np.bytes_))

Callers

nothing calls this directly

Calls 3

assert_Function · 0.90
assert_array_equalFunction · 0.90
replaceMethod · 0.80

Tested by

no test coverage detected