MCPcopy Index your code
hub / github.com/numpy/numpy / test_title

Method test_title

numpy/_core/tests/test_defchararray.py:657–669  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

655 assert_array_equal(B.swapcase(), tgt)
656
657 def test_title(self):
658 A, B = self.A(), self.B()
659 tgt = [[b' Abc ', b''],
660 [b'12345', b'Mixedcase'],
661 [b'123 \t 345 \0 ', b'Upper']]
662 assert_(issubclass(A.title().dtype.type, np.bytes_))
663 assert_array_equal(A.title(), tgt)
664
665 tgt = [[' \u03a3 ', ''],
666 ['12345', 'Mixedcase'],
667 ['123 \t 345 \0 ', 'Upper']]
668 assert_(issubclass(B.title().dtype.type, np.str_))
669 assert_array_equal(B.title(), tgt)
670
671 def test_upper(self):
672 A, B = self.A(), self.B()

Callers

nothing calls this directly

Calls 5

AMethod · 0.95
BMethod · 0.95
assert_Function · 0.90
assert_array_equalFunction · 0.90
titleMethod · 0.80

Tested by

no test coverage detected