(self)
| 371 | assert_array_equal(np.char.join([',', '#'], A0), tgt) |
| 372 | |
| 373 | def test_ljust(self): |
| 374 | assert_(issubclass(self.A.ljust(10).dtype.type, np.bytes_)) |
| 375 | |
| 376 | C = self.A.ljust([10, 20]) |
| 377 | assert_array_equal(np.char.str_len(C), [[10, 20], [10, 20], [12, 20]]) |
| 378 | |
| 379 | C = self.A.ljust(20, b'#') |
| 380 | assert_array_equal(C.startswith(b'#'), [ |
| 381 | [False, True], [False, False], [False, False]]) |
| 382 | assert_(np.all(C.endswith(b'#'))) |
| 383 | |
| 384 | C = np.char.ljust(b'FOO', [[10, 20], [15, 8]]) |
| 385 | tgt = [[b'FOO ', b'FOO '], |
| 386 | [b'FOO ', b'FOO ']] |
| 387 | assert_(issubclass(C.dtype.type, np.bytes_)) |
| 388 | assert_array_equal(C, tgt) |
| 389 | |
| 390 | def test_lower(self): |
| 391 | tgt = [[b' abc ', b''], |
nothing calls this directly
no test coverage detected