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

Method test_lstrip

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

Source from the content-addressed store, hash-verified

260
261 @bigmemtest(size=_2G + 10, memuse=1)
262 def test_lstrip(self, size):
263 _ = self.from_latin1
264 SUBSTR = _('abc def ghi')
265 s = SUBSTR.rjust(size)
266 self.assertEqual(len(s), size)
267 self.assertEqual(s.lstrip(), SUBSTR.lstrip())
268 del s
269 s = SUBSTR.ljust(size)
270 self.assertEqual(len(s), size)
271 # Type-specific optimization
272 if isinstance(s, (str, bytes)):
273 stripped = s.lstrip()
274 self.assertTrue(stripped is s)
275
276 @bigmemtest(size=_2G + 10, memuse=2)
277 def test_replace(self, size):

Callers

nothing calls this directly

Calls 6

assertTrueMethod · 0.80
_Function · 0.70
rjustMethod · 0.45
assertEqualMethod · 0.45
lstripMethod · 0.45
ljustMethod · 0.45

Tested by

no test coverage detected