MCPcopy Index your code
hub / github.com/RustPython/RustPython / _test_capitalize

Method _test_capitalize

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

Source from the content-addressed store, hash-verified

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

Callers 3

test_capitalizeMethod · 0.80
test_capitalizeMethod · 0.80
test_capitalizeMethod · 0.80

Calls 6

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

Tested by

no test coverage detected