MCPcopy Index your code
hub / github.com/python/cpython / _test_capitalize

Method _test_capitalize

Lib/test/test_bigmem.py:73–80  ·  view source on GitHub ↗
(self, size)

Source from the content-addressed store, hash-verified

71class BaseStrTest:
72
73 def _test_capitalize(self, size):
74 _ = self.from_latin1
75 SUBSTR = self.from_latin1(' abc def ghi')
76 s = _('-') * size + SUBSTR
77 caps = s.capitalize()
78 self.assertEqual(caps[-len(SUBSTR):],
79 SUBSTR.capitalize())
80 self.assertEqual(caps.lstrip(_('-')), SUBSTR)
81
82 @bigmemtest(size=_2G + 10, memuse=1)
83 def test_center(self, size):

Callers 3

test_capitalizeMethod · 0.80
test_capitalizeMethod · 0.80
test_capitalizeMethod · 0.80

Calls 5

_Function · 0.70
from_latin1Method · 0.45
capitalizeMethod · 0.45
assertEqualMethod · 0.45
lstripMethod · 0.45

Tested by

no test coverage detected