Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
50288f96
Kaydet (Commit)
50288f96
authored
Haz 11, 2016
tarafından
Terry Jan Reedy
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #5124: rename PyShell back to pyshell and patch test for 3.6
üst
b5c43f4c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
13 deletions
+15
-13
test_editmenu.py
Lib/idlelib/idle_test/test_editmenu.py
+15
-13
pyshell.py
Lib/idlelib/pyshell.py
+0
-0
No files found.
Lib/idlelib/idle_test/test_editmenu.py
Dosyayı görüntüle @
50288f96
...
...
@@ -5,8 +5,9 @@ Edit modules have their own test files files
from
test.support
import
requires
requires
(
'gui'
)
import
tkinter
as
tk
from
tkinter
import
ttk
import
unittest
from
idlelib
import
PyS
hell
from
idlelib
import
pys
hell
class
PasteTest
(
unittest
.
TestCase
):
'''Test pasting into widgets that allow pasting.
...
...
@@ -16,16 +17,17 @@ class PasteTest(unittest.TestCase):
@classmethod
def
setUpClass
(
cls
):
cls
.
root
=
root
=
tk
.
Tk
()
PyS
hell
.
fix_x11_paste
(
root
)
pys
hell
.
fix_x11_paste
(
root
)
cls
.
text
=
tk
.
Text
(
root
)
cls
.
entry
=
tk
.
Entry
(
root
)
cls
.
tentry
=
ttk
.
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
del
cls
.
text
,
cls
.
entry
,
cls
.
tentry
cls
.
root
.
clipboard_clear
()
cls
.
root
.
update_idletasks
()
cls
.
root
.
destroy
()
...
...
@@ -43,16 +45,16 @@ class PasteTest(unittest.TestCase):
def
test_paste_entry
(
self
):
"Test pasting into an entry with and without a selection."
#
On 3.6, generated <<Paste>> fails without empty select range
# for 'no selection'. Live widget works fine.
entry
=
self
.
entry
for
end
,
ans
in
(
0
,
'onetwo'
),
(
'end'
,
'two'
):
with
self
.
subTest
(
entry
=
entry
,
end
=
end
,
ans
=
ans
):
entry
.
delete
(
0
,
'end'
)
entry
.
insert
(
0
,
'one'
)
entry
.
select_range
(
0
,
end
)
# see note
entry
.
event_generate
(
'<<Paste>>'
)
self
.
assertEqual
(
entry
.
get
(),
ans
)
#
Generated <<Paste>> fails for tk entry without empty select
#
range
for 'no selection'. Live widget works fine.
for
entry
in
self
.
entry
,
self
.
tentry
:
for
end
,
ans
in
(
0
,
'onetwo'
),
(
'end'
,
'two'
):
with
self
.
subTest
(
entry
=
entry
,
end
=
end
,
ans
=
ans
):
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
(
self
):
"Test pasting into a spinbox with and without a selection."
...
...
Lib/idlelib/
PyS
hell.py
→
Lib/idlelib/
pys
hell.py
Dosyayı görüntüle @
50288f96
File moved
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment