(self, size)
| 332 | |
| 333 | @bigmemtest(size=_2G + 10, memuse=1) |
| 334 | def test_rstrip(self, size): |
| 335 | _ = self.from_latin1 |
| 336 | SUBSTR = _(' abc def ghi') |
| 337 | s = SUBSTR.ljust(size) |
| 338 | self.assertEqual(len(s), size) |
| 339 | self.assertEqual(s.rstrip(), SUBSTR.rstrip()) |
| 340 | del s |
| 341 | s = SUBSTR.rjust(size) |
| 342 | self.assertEqual(len(s), size) |
| 343 | # Type-specific optimization |
| 344 | if isinstance(s, (str, bytes)): |
| 345 | stripped = s.rstrip() |
| 346 | self.assertTrue(stripped is s) |
| 347 | |
| 348 | # The test takes about size bytes to build a string, and then about |
| 349 | # sqrt(size) substrings of sqrt(size) in size and a list to |
nothing calls this directly
no test coverage detected