MCPcopy Create free account
hub / github.com/python/cpython / test_rstrip_lines

Method test_rstrip_lines

Lib/idlelib/idle_test/test_format.py:633–650  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

631 self.text.delete('1.0', 'end-1c')
632
633 def test_rstrip_lines(self):
634 original = (
635 "Line with an ending tab \n"
636 "Line ending in 5 spaces \n"
637 "Linewithnospaces\n"
638 " indented line\n"
639 " indented line with trailing space \n"
640 " \n")
641 stripped = (
642 "Line with an ending tab\n"
643 "Line ending in 5 spaces\n"
644 "Linewithnospaces\n"
645 " indented line\n"
646 " indented line with trailing space\n")
647
648 self.text.insert('1.0', original)
649 self.do_rstrip()
650 self.assertEqual(self.text.get('1.0', 'insert'), stripped)
651
652 def test_rstrip_end(self):
653 text = self.text

Callers

nothing calls this directly

Calls 4

do_rstripMethod · 0.80
insertMethod · 0.45
assertEqualMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected