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

Method test_title

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

Source from the content-addressed store, hash-verified

535 assert_array_equal(self.B.swapcase(), tgt)
536
537 def test_title(self):
538 tgt = [[b' Abc ', b''],
539 [b'12345', b'Mixedcase'],
540 [b'123 \t 345 \0 ', b'Upper']]
541 assert_(issubclass(self.A.title().dtype.type, np.bytes_))
542 assert_array_equal(self.A.title(), tgt)
543
544 tgt = [[' \u03a3 ', ''],
545 ['12345', 'Mixedcase'],
546 ['123 \t 345 \0 ', 'Upper']]
547 assert_(issubclass(self.B.title().dtype.type, np.str_))
548 assert_array_equal(self.B.title(), tgt)
549
550 def test_upper(self):
551 tgt = [[b' ABC ', b''],

Callers

nothing calls this directly

Calls 3

assert_Function · 0.90
assert_array_equalFunction · 0.90
titleMethod · 0.80

Tested by

no test coverage detected