PATH: //opt/alt/python27/lib64/python2.7/idlelib/idle_test
FILE_BARU
CREATE
FOLDER_BARU
MKDIR
UPLOAD_FILE
GO
[ .. KEMBALI ]
📄 README.txt
↓
X
📄 __init__.py
↓
X
📄 __init__.pyc
↓
X
📄 __init__.pyo
↓
X
📄 htest.py
↓
X
📄 htest.pyc
↓
X
📄 htest.pyo
↓
X
📄 mock_idle.py
↓
X
📄 mock_idle.pyc
↓
X
📄 mock_idle.pyo
↓
X
📄 mock_tk.py
↓
X
📄 mock_tk.pyc
↓
X
📄 mock_tk.pyo
↓
X
📄 test_autocomplete.py
↓
X
📄 test_autocomplete.pyc
↓
X
📄 test_autocomplete.pyo
↓
X
📄 test_autoexpand.py
↓
X
📄 test_autoexpand.pyc
↓
X
📄 test_autoexpand.pyo
↓
X
📄 test_calltips.py
↓
X
📄 test_calltips.pyc
↓
X
📄 test_calltips.pyo
↓
X
📄 test_config_name.py
↓
X
📄 test_config_name.pyc
↓
X
📄 test_config_name.pyo
↓
X
📄 test_configdialog.py
↓
X
📄 test_configdialog.pyc
↓
X
📄 test_configdialog.pyo
↓
X
📄 test_delegator.py
↓
X
📄 test_delegator.pyc
↓
X
📄 test_delegator.pyo
↓
X
📄 test_editmenu.py
↓
X
📄 test_editmenu.pyc
↓
X
📄 test_editmenu.pyo
↓
X
📄 test_formatparagraph.py
↓
X
📄 test_formatparagraph.pyc
↓
X
📄 test_formatparagraph.pyo
↓
X
📄 test_grep.py
↓
X
📄 test_grep.pyc
↓
X
📄 test_grep.pyo
↓
X
📄 test_helpabout.py
↓
X
📄 test_helpabout.pyc
↓
X
📄 test_helpabout.pyo
↓
X
📄 test_hyperparser.py
↓
X
📄 test_hyperparser.pyc
↓
X
📄 test_hyperparser.pyo
↓
X
📄 test_idlehistory.py
↓
X
📄 test_idlehistory.pyc
↓
X
📄 test_idlehistory.pyo
↓
X
📄 test_io.py
↓
X
📄 test_io.pyc
↓
X
📄 test_io.pyo
↓
X
📄 test_parenmatch.py
↓
X
📄 test_parenmatch.pyc
↓
X
📄 test_parenmatch.pyo
↓
X
📄 test_pathbrowser.py
↓
X
📄 test_pathbrowser.pyc
↓
X
📄 test_pathbrowser.pyo
↓
X
📄 test_rstrip.py
↓
X
📄 test_rstrip.pyc
↓
X
📄 test_rstrip.pyo
↓
X
📄 test_searchdialogbase.py
↓
X
📄 test_searchdialogbase.pyc
↓
X
📄 test_searchdialogbase.pyo
↓
X
📄 test_searchengine.py
↓
X
📄 test_searchengine.pyc
↓
X
📄 test_searchengine.pyo
↓
X
📄 test_text.py
↓
X
📄 test_text.pyc
↓
X
📄 test_text.pyo
↓
X
📄 test_textview.py
↓
X
📄 test_textview.pyc
↓
X
📄 test_textview.pyo
↓
X
📄 test_warning.py
↓
X
📄 test_warning.pyc
↓
X
📄 test_warning.pyo
↓
X
📄 test_widgetredir.py
↓
X
📄 test_widgetredir.pyc
↓
X
📄 test_widgetredir.pyo
↓
X
SAVING...
BERHASIL DIUBAH!
EDITING: test_editmenu.py
'''Test (selected) IDLE Edit menu items. Edit modules have their own test files files ''' from test.test_support import requires import Tkinter as tk import unittest from idlelib import PyShell class PasteTest(unittest.TestCase): '''Test pasting into widgets that allow pasting. On X11, replacing selections requires tk fix. ''' @classmethod def setUpClass(cls): requires('gui') cls.root = root = tk.Tk() root.withdraw() PyShell.fix_x11_paste(root) cls.text = tk.Text(root) cls.entry = tk.Entry(root) cls.spin = tk.Spinbox(root) root.clipboard_clear() root.clipboard_append('two') @classmethod def tearDownClass(cls): del cls.text, cls.entry, cls.spin cls.root.clipboard_clear() cls.root.update_idletasks() cls.root.update() cls.root.destroy() del cls.root def test_paste_text_no_selection(self): "Test pasting into text without a selection." text = self.text tag, ans = '', 'onetwo\n' text.delete('1.0', 'end') text.insert('1.0', 'one', tag) text.event_generate('<<Paste>>') self.assertEqual(text.get('1.0', 'end'), ans) def test_paste_text_selection(self): "Test pasting into text with a selection." text = self.text tag, ans = 'sel', 'two\n' text.delete('1.0', 'end') text.insert('1.0', 'one', tag) text.event_generate('<<Paste>>') self.assertEqual(text.get('1.0', 'end'), ans) def test_paste_entry_no_selection(self): "Test pasting into an entry without a selection." # On 3.6, generated <<Paste>> fails without empty select range # for 'no selection'. Live widget works fine. entry = self.entry end, ans = 0, 'onetwo' entry.delete(0, 'end') entry.insert(0, 'one') entry.select_range(0, end) # see note entry.event_generate('<<Paste>>') self.assertEqual(entry.get(), ans) def test_paste_entry_selection(self): "Test pasting into an entry with a selection." entry = self.entry end, ans = 'end', 'two' entry.delete(0, 'end') entry.insert(0, 'one') entry.select_range(0, end) entry.event_generate('<<Paste>>') self.assertEqual(entry.get(), ans) def test_paste_spin_no_selection(self): "Test pasting into a spinbox without a selection." # See note above for entry. spin = self.spin end, ans = 0, 'onetwo' spin.delete(0, 'end') spin.insert(0, 'one') spin.selection('range', 0, end) # see note spin.event_generate('<<Paste>>') self.assertEqual(spin.get(), ans) def test_paste_spin_selection(self): "Test pasting into a spinbox with a selection." spin = self.spin end, ans = 'end', 'two' spin.delete(0, 'end') spin.insert(0, 'one') spin.selection('range', 0, end) spin.event_generate('<<Paste>>') self.assertEqual(spin.get(), ans) if __name__ == '__main__': unittest.main(verbosity=2)
SIMPAN PERUBAHAN