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

Method test_ljust

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

Source from the content-addressed store, hash-verified

243
244 @bigmemtest(size=_2G + 10, memuse=1)
245 def test_ljust(self, size):
246 _ = self.from_latin1
247 SUBSTR = _(' abc def ghi')
248 s = SUBSTR.ljust(size)
249 self.assertTrue(s.startswith(SUBSTR + _(' ')))
250 self.assertEqual(len(s), size)
251 self.assertEqual(s.strip(), SUBSTR.strip())
252
253 @bigmemtest(size=_2G + 10, memuse=2)
254 def test_lower(self, size):

Callers

nothing calls this directly

Calls 6

assertTrueMethod · 0.80
_Function · 0.70
ljustMethod · 0.45
startswithMethod · 0.45
assertEqualMethod · 0.45
stripMethod · 0.45

Tested by

no test coverage detected