(self)
| 397 | assert_array_equal(B.capitalize(), tgt) |
| 398 | |
| 399 | def test_center(self): |
| 400 | A = self.A() |
| 401 | assert_(issubclass(A.center(10).dtype.type, np.bytes_)) |
| 402 | C = A.center([10, 20]) |
| 403 | assert_array_equal(np.char.str_len(C), [[10, 20], [10, 20], [12, 20]]) |
| 404 | |
| 405 | C = A.center(20, b'#') |
| 406 | assert_(np.all(C.startswith(b'#'))) |
| 407 | assert_(np.all(C.endswith(b'#'))) |
| 408 | |
| 409 | C = np.char.center(b'FOO', [[10, 20], [15, 8]]) |
| 410 | tgt = [[b' FOO ', b' FOO '], |
| 411 | [b' FOO ', b' FOO ']] |
| 412 | assert_(issubclass(C.dtype.type, np.bytes_)) |
| 413 | assert_array_equal(C, tgt) |
| 414 | |
| 415 | def test_decode(self): |
| 416 | A = np.char.array([b'\\u03a3']) |
nothing calls this directly
no test coverage detected