• File: test_editmenu.cpython-37.opt-1.pyc
  • Full Path: /home3/farmfre2/public_html/ALFA_DATA/alfasymlink/root/opt/alt/python37/lib64/python3.7/idlelib/idle_test/__pycache__/test_editmenu.cpython-37.opt-1.pyc
  • Date Modified: 10/26/2026 8:08 PM
  • File size: 2.68 KB
  • MIME-type: text/x-bytecode.python
  • Charset: 8 bit
B

Nj
@sjdZddlmZedddlZddlmZddlZddlmZGdddej	Z
ed	krfejd
ddS)zNTest (selected) IDLE Edit menu items.

Edit modules have their own test files
)requiresZguiN)ttk)pyshellc@s@eZdZdZeddZeddZddZdd	Zd
dZ	dS)
	PasteTestzeTest pasting into widgets that allow pasting.

    On X11, replacing selections requires tk fix.
    cCsht|_}|jt|t||_t||_	t
||_t||_
||ddS)Ntwo)tkZTkrootZwithdrawrZ
fix_x11_pasteZTexttextZEntryentryrtentryZSpinboxspinclipboard_clearZclipboard_append)clsrrD/opt/alt/python37/lib64/python3.7/idlelib/idle_test/test_editmenu.py
setUpClasss

zPasteTest.setUpClasscCs2|`|`|`|j|j|j|`dS)N)r	r
rrr
Zupdate_idletasksZdestroy)rrrr
tearDownClasss



zPasteTest.tearDownClassc
Csn|j}xbdD]Z\}}|j||d>|dd|dd||d||dd|WdQRXqWdS)z4Test pasting into text with and without a selection.))zonetwo
)Zselztwo
)tagansz1.0endonez	<<Paste>>N)r	subTestdeleteinsertevent_generateassertEqualget)selfr	rrrrrtest_paste_text%s
zPasteTest.test_paste_textcCsx|j|jfD]p}xjdD]b\}}|j|||dD|dd|dd|d||d|||WdQRXqWqWdS)z8Test pasting into an entry with and without a selection.))ronetwo)rr)r
rrrrrz	<<Paste>>N)	r
rrrrZselect_rangerrr)rr
rrrrrtest_paste_entry/s
zPasteTest.test_paste_entryc
Csv|j}xjdD]b\}}|j||dF|dd|dd|dd||d|||WdQRXqWdS)	z9Test pasting into a spinbox with and without a selection.))rr )rr)rrrrrrangez	<<Paste>>N)rrrrZ	selectionrrr)rrrrrrrtest_paste_spin<s
zPasteTest.test_paste_spinN)
__name__
__module____qualname____doc__classmethodrrrr!r#rrrrrs

r__main__)	verbosity)
r'Ztest.supportrZtkinterrrZunittestZidlelibrZTestCaserr$mainrrrr<module>s=