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

Method test_lstrip

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 8

lenFunction · 0.85
isinstanceFunction · 0.85
assertTrueMethod · 0.80
_Function · 0.70
rjustMethod · 0.45
assertEqualMethod · 0.45
lstripMethod · 0.45
ljustMethod · 0.45

Tested by

no test coverage detected