(self)
| 332 | assert_array_equal(self.B.capitalize(), tgt) |
| 333 | |
| 334 | def test_center(self): |
| 335 | assert_(issubclass(self.A.center(10).dtype.type, np.bytes_)) |
| 336 | C = self.A.center([10, 20]) |
| 337 | assert_array_equal(np.char.str_len(C), [[10, 20], [10, 20], [12, 20]]) |
| 338 | |
| 339 | C = self.A.center(20, b'#') |
| 340 | assert_(np.all(C.startswith(b'#'))) |
| 341 | assert_(np.all(C.endswith(b'#'))) |
| 342 | |
| 343 | C = np.char.center(b'FOO', [[10, 20], [15, 8]]) |
| 344 | tgt = [[b' FOO ', b' FOO '], |
| 345 | [b' FOO ', b' FOO ']] |
| 346 | assert_(issubclass(C.dtype.type, np.bytes_)) |
| 347 | assert_array_equal(C, tgt) |
| 348 | |
| 349 | def test_decode(self): |
| 350 | A = np.char.array([b'\\u03a3']) |
nothing calls this directly
no test coverage detected