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

Method test_rstrip_end

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

Source from the content-addressed store, hash-verified

650 self.assertEqual(self.text.get('1.0', 'insert'), stripped)
651
652 def test_rstrip_end(self):
653 text = self.text
654 for code in ('', '\n', '\n\n\n'):
655 with self.subTest(code=code):
656 text.insert('1.0', code)
657 self.do_rstrip()
658 self.assertEqual(text.get('1.0','end-1c'), '')
659 for code in ('a\n', 'a\n\n', 'a\n\n\n'):
660 with self.subTest(code=code):
661 text.delete('1.0', 'end-1c')
662 text.insert('1.0', code)
663 self.do_rstrip()
664 self.assertEqual(text.get('1.0','end-1c'), 'a\n')
665
666
667if __name__ == '__main__':

Callers

nothing calls this directly

Calls 6

do_rstripMethod · 0.80
subTestMethod · 0.45
insertMethod · 0.45
assertEqualMethod · 0.45
getMethod · 0.45
deleteMethod · 0.45

Tested by

no test coverage detected