code: def test_rstrip_line(self):
      editor = Editor()
      text = editor.text
      do_rstrip = rs.RstripExtension(editor).do_rstrip
  
      do_rstrip()
      self.assertEqual(text.get("1.0", "insert"), "")
      text.insert("1.0", "     ")
      do_rstrip()
      self.assertEqual(text.get("1.0", "insert"), "")
      text.insert("1.0", "     \n")
      do_rstrip()
      self.assertEqual(text.get("1.0", "insert"), "\n")
  
imports: import unittest
  import idlelib.RstripExtension
  from idlelib.idle_test.mock_idle import Editor
label_desc: Use image node_id 1 for calling the rstripTest obj's underlying member method code with example usage: obj.test_rstrip_line() without return types