/usr/lib64/python2.7/idlelib/idle_test
NameSizeModeActions
htest.py137790644editdlrm
htest.pyc126000644editdlrm
htest.pyo126000644editdlrm
mock_idle.py15970644editdlrm
mock_idle.pyc28790644editdlrm
mock_idle.pyo28790644editdlrm
mock_tk.py115740644editdlrm
mock_tk.pyc123620644editdlrm
mock_tk.pyo123620644editdlrm
README.txt54920644editdlrm
test_autocomplete.py49220644editdlrm
test_autocomplete.pyc58600644editdlrm
test_autocomplete.pyo58600644editdlrm
test_autoexpand.py41220644editdlrm
test_autoexpand.pyc48060644editdlrm
test_autoexpand.pyo48060644editdlrm
test_calltips.py71400644editdlrm
test_calltips.pyc121310644editdlrm
test_calltips.pyo121310644editdlrm
test_configdialog.py7820644editdlrm
test_configdialog.pyc16550644editdlrm
test_configdialog.pyo16550644editdlrm
test_config_name.py24720644editdlrm
test_config_name.pyc40120644editdlrm
test_config_name.pyo40120644editdlrm
test_delegator.py12940644editdlrm
test_delegator.pyc13190644editdlrm
test_delegator.pyo13190644editdlrm
test_editmenu.py31670644editdlrm
test_editmenu.pyc44390644editdlrm
test_editmenu.pyo44390644editdlrm
test_formatparagraph.py143440644editdlrm
test_formatparagraph.pyc143180644editdlrm
test_formatparagraph.pyo143180644editdlrm
test_grep.py27620644editdlrm
test_grep.pyc37600644editdlrm
test_grep.pyo37600644editdlrm
test_helpabout.py16110644editdlrm
test_helpabout.pyc23630644editdlrm
test_helpabout.pyo23630644editdlrm
test_hyperparser.py56840644editdlrm
test_hyperparser.pyc67340644editdlrm
test_hyperparser.pyo67340644editdlrm
test_idlehistory.py54950644editdlrm
test_idlehistory.pyc81420644editdlrm
test_idlehistory.pyo81420644editdlrm
test_io.py95050644editdlrm
test_io.pyc115330644editdlrm
test_io.pyo115330644editdlrm
test_parenmatch.py38220644editdlrm
test_parenmatch.pyc54560644editdlrm
test_parenmatch.pyo54560644editdlrm
test_pathbrowser.py9400644editdlrm
test_pathbrowser.pyc14850644editdlrm
test_pathbrowser.pyo14850644editdlrm
test_rstrip.py16130644editdlrm
test_rstrip.pyc17730644editdlrm
test_rstrip.pyo17730644editdlrm
test_searchdialogbase.py58630644editdlrm
test_searchdialogbase.pyc68270644editdlrm
test_searchdialogbase.pyo68270644editdlrm
test_searchengine.py114870644editdlrm
test_searchengine.pyc126490644editdlrm
test_searchengine.pyo126490644editdlrm
test_text.py67440644editdlrm
test_text.pyc81480644editdlrm
test_text.pyo81480644editdlrm
test_textview.py28020644editdlrm
test_textview.pyc45310644editdlrm
test_textview.pyo45310644editdlrm
test_warning.py27570644editdlrm
test_warning.pyc32860644editdlrm
test_warning.pyo32860644editdlrm
test_widgetredir.py41770644editdlrm
test_widgetredir.pyc63840644editdlrm
test_widgetredir.pyo63840644editdlrm
__init__.py6500644editdlrm
__init__.pyc9150644editdlrm
__init__.pyo9150644editdlrm
Edit: /usr/lib64/python2.7/idlelib/idle_test/test_editmenu.py (3167B)
'''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('<>') 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('<>') 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 <> 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('<>') 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('<>') 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('<>') 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('<>') self.assertEqual(spin.get(), ans) if __name__ == '__main__': unittest.main(verbosity=2)