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

Method _test_title

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

Source from the content-addressed store, hash-verified

432 self.assertEqual(s[-sublen * 3:], SUBSTR.swapcase() * 3)
433
434 def _test_title(self, size):
435 _ = self.from_latin1
436 SUBSTR = _('SpaaHAaaAaham')
437 s = SUBSTR * (size // len(SUBSTR) + 2)
438 s = s.title()
439 self.assertTrue(s.startswith((SUBSTR * 3).title()))
440 self.assertTrue(s.endswith(SUBSTR.lower() * 3))
441
442 @bigmemtest(size=_2G, memuse=2)
443 def test_translate(self, size):

Callers 3

test_titleMethod · 0.80
test_titleMethod · 0.80
test_titleMethod · 0.80

Calls 7

lenFunction · 0.85
assertTrueMethod · 0.80
_Function · 0.70
titleMethod · 0.45
startswithMethod · 0.45
endswithMethod · 0.45
lowerMethod · 0.45

Tested by

no test coverage detected