(self)
| 437 | assert_array_equal(np.char.join([',', '#'], A0), tgt) |
| 438 | |
| 439 | def test_ljust(self): |
| 440 | A = self.A() |
| 441 | assert_(issubclass(A.ljust(10).dtype.type, np.bytes_)) |
| 442 | |
| 443 | C = A.ljust([10, 20]) |
| 444 | assert_array_equal(np.char.str_len(C), [[10, 20], [10, 20], [12, 20]]) |
| 445 | |
| 446 | C = A.ljust(20, b'#') |
| 447 | assert_array_equal(C.startswith(b'#'), [ |
| 448 | [False, True], [False, False], [False, False]]) |
| 449 | assert_(np.all(C.endswith(b'#'))) |
| 450 | |
| 451 | C = np.char.ljust(b'FOO', [[10, 20], [15, 8]]) |
| 452 | tgt = [[b'FOO ', b'FOO '], |
| 453 | [b'FOO ', b'FOO ']] |
| 454 | assert_(issubclass(C.dtype.type, np.bytes_)) |
| 455 | assert_array_equal(C, tgt) |
| 456 | |
| 457 | def test_lower(self): |
| 458 | A, B = self.A(), self.B() |
nothing calls this directly
no test coverage detected