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
905c6b7f
Kaydet (Commit)
905c6b7f
authored
Şub 02, 2009
tarafından
Guilherme Polo
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Use a single Tcl interpreter through all these tests, this may help some
failing buildbots.
üst
3b331dd3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
16 deletions
+34
-16
support.py
Lib/lib-tk/test/test_ttk/support.py
+8
-0
test_extensions.py
Lib/lib-tk/test/test_ttk/test_extensions.py
+10
-3
test_style.py
Lib/lib-tk/test/test_ttk/test_style.py
+1
-9
test_widgets.py
Lib/lib-tk/test/test_ttk/test_widgets.py
+15
-4
No files found.
Lib/lib-tk/test/test_ttk/support.py
Dosyayı görüntüle @
905c6b7f
...
@@ -15,6 +15,14 @@ def get_tk_root():
...
@@ -15,6 +15,14 @@ def get_tk_root():
return
root
return
root
def
root_deiconify
():
root
=
get_tk_root
()
root
.
deiconify
()
def
root_withdraw
():
root
=
get_tk_root
()
root
.
withdraw
()
def
simulate_mouse_click
(
widget
,
x
,
y
):
def
simulate_mouse_click
(
widget
,
x
,
y
):
"""Generate proper events to click at the x, y position (tries to act
"""Generate proper events to click at the x, y position (tries to act
...
...
Lib/lib-tk/test/test_ttk/test_extensions.py
Dosyayı görüntüle @
905c6b7f
...
@@ -10,6 +10,13 @@ requires('gui')
...
@@ -10,6 +10,13 @@ requires('gui')
class
LabeledScaleTest
(
unittest
.
TestCase
):
class
LabeledScaleTest
(
unittest
.
TestCase
):
def
setUp
(
self
):
support
.
root_deiconify
()
def
tearDown
(
self
):
support
.
root_withdraw
()
def
test_widget_destroy
(
self
):
def
test_widget_destroy
(
self
):
# automatically created variable
# automatically created variable
x
=
ttk
.
LabeledScale
()
x
=
ttk
.
LabeledScale
()
...
@@ -175,12 +182,12 @@ class LabeledScaleTest(unittest.TestCase):
...
@@ -175,12 +182,12 @@ class LabeledScaleTest(unittest.TestCase):
class
OptionMenuTest
(
unittest
.
TestCase
):
class
OptionMenuTest
(
unittest
.
TestCase
):
def
setUp
(
self
):
def
setUp
(
self
):
s
elf
.
root
=
support
.
get_tk_root
()
s
upport
.
root_deiconify
()
self
.
textvar
=
Tkinter
.
StringVar
(
self
.
root
)
self
.
textvar
=
Tkinter
.
StringVar
()
def
tearDown
(
self
):
def
tearDown
(
self
):
del
self
.
textvar
del
self
.
textvar
s
elf
.
root
.
destroy
()
s
upport
.
root_withdraw
()
def
test_widget_destroy
(
self
):
def
test_widget_destroy
(
self
):
...
...
Lib/lib-tk/test/test_ttk/test_style.py
Dosyayı görüntüle @
905c6b7f
...
@@ -10,15 +10,7 @@ requires('gui')
...
@@ -10,15 +10,7 @@ requires('gui')
class
StyleTest
(
unittest
.
TestCase
):
class
StyleTest
(
unittest
.
TestCase
):
def
setUp
(
self
):
def
setUp
(
self
):
self
.
root
=
support
.
get_tk_root
()
self
.
style
=
ttk
.
Style
()
self
.
style
=
ttk
.
Style
(
self
.
root
)
def
tearDown
(
self
):
# As tests have shown, these tests are likely to deliver
# <<ThemeChanged>> events after the root is destroyed, so
# lets let them happen now.
self
.
root
.
update_idletasks
()
self
.
root
.
destroy
()
def
test_configure
(
self
):
def
test_configure
(
self
):
...
...
Lib/lib-tk/test/test_ttk/test_widgets.py
Dosyayı görüntüle @
905c6b7f
...
@@ -12,12 +12,14 @@ class WidgetTest(unittest.TestCase):
...
@@ -12,12 +12,14 @@ class WidgetTest(unittest.TestCase):
"""Tests methods available in every ttk widget."""
"""Tests methods available in every ttk widget."""
def
setUp
(
self
):
def
setUp
(
self
):
support
.
root_deiconify
()
self
.
widget
=
ttk
.
Button
()
self
.
widget
=
ttk
.
Button
()
self
.
widget
.
pack
()
self
.
widget
.
pack
()
self
.
widget
.
wait_visibility
()
self
.
widget
.
wait_visibility
()
def
tearDown
(
self
):
def
tearDown
(
self
):
self
.
widget
.
destroy
()
self
.
widget
.
destroy
()
support
.
root_withdraw
()
def
test_identify
(
self
):
def
test_identify
(
self
):
...
@@ -107,10 +109,12 @@ class CheckbuttonTest(unittest.TestCase):
...
@@ -107,10 +109,12 @@ class CheckbuttonTest(unittest.TestCase):
class
ComboboxTest
(
unittest
.
TestCase
):
class
ComboboxTest
(
unittest
.
TestCase
):
def
setUp
(
self
):
def
setUp
(
self
):
support
.
root_deiconify
()
self
.
combo
=
ttk
.
Combobox
()
self
.
combo
=
ttk
.
Combobox
()
def
tearDown
(
self
):
def
tearDown
(
self
):
self
.
combo
.
destroy
()
self
.
combo
.
destroy
()
support
.
root_withdraw
()
def
_show_drop_down_listbox
(
self
):
def
_show_drop_down_listbox
(
self
):
width
=
self
.
combo
.
winfo_width
()
width
=
self
.
combo
.
winfo_width
()
...
@@ -195,10 +199,12 @@ class ComboboxTest(unittest.TestCase):
...
@@ -195,10 +199,12 @@ class ComboboxTest(unittest.TestCase):
class
EntryTest
(
unittest
.
TestCase
):
class
EntryTest
(
unittest
.
TestCase
):
def
setUp
(
self
):
def
setUp
(
self
):
support
.
root_deiconify
()
self
.
entry
=
ttk
.
Entry
()
self
.
entry
=
ttk
.
Entry
()
def
tearDown
(
self
):
def
tearDown
(
self
):
self
.
entry
.
destroy
()
self
.
entry
.
destroy
()
support
.
root_withdraw
()
def
test_bbox
(
self
):
def
test_bbox
(
self
):
...
@@ -297,10 +303,12 @@ class EntryTest(unittest.TestCase):
...
@@ -297,10 +303,12 @@ class EntryTest(unittest.TestCase):
class
PanedwindowTest
(
unittest
.
TestCase
):
class
PanedwindowTest
(
unittest
.
TestCase
):
def
setUp
(
self
):
def
setUp
(
self
):
support
.
root_deiconify
()
self
.
paned
=
ttk
.
Panedwindow
()
self
.
paned
=
ttk
.
Panedwindow
()
def
tearDown
(
self
):
def
tearDown
(
self
):
self
.
paned
.
destroy
()
self
.
paned
.
destroy
()
support
.
root_withdraw
()
def
test_add
(
self
):
def
test_add
(
self
):
...
@@ -445,12 +453,14 @@ class RadiobuttonTest(unittest.TestCase):
...
@@ -445,12 +453,14 @@ class RadiobuttonTest(unittest.TestCase):
class
ScaleTest
(
unittest
.
TestCase
):
class
ScaleTest
(
unittest
.
TestCase
):
def
setUp
(
self
):
def
setUp
(
self
):
support
.
root_deiconify
()
self
.
scale
=
ttk
.
Scale
()
self
.
scale
=
ttk
.
Scale
()
self
.
scale
.
pack
()
self
.
scale
.
pack
()
self
.
scale
.
update
()
self
.
scale
.
update
()
def
tearDown
(
self
):
def
tearDown
(
self
):
self
.
scale
.
destroy
()
self
.
scale
.
destroy
()
support
.
root_withdraw
()
def
test_custom_event
(
self
):
def
test_custom_event
(
self
):
...
@@ -519,6 +529,7 @@ class ScaleTest(unittest.TestCase):
...
@@ -519,6 +529,7 @@ class ScaleTest(unittest.TestCase):
class
NotebookTest
(
unittest
.
TestCase
):
class
NotebookTest
(
unittest
.
TestCase
):
def
setUp
(
self
):
def
setUp
(
self
):
support
.
root_deiconify
()
self
.
nb
=
ttk
.
Notebook
()
self
.
nb
=
ttk
.
Notebook
()
self
.
child1
=
ttk
.
Label
()
self
.
child1
=
ttk
.
Label
()
self
.
child2
=
ttk
.
Label
()
self
.
child2
=
ttk
.
Label
()
...
@@ -529,6 +540,7 @@ class NotebookTest(unittest.TestCase):
...
@@ -529,6 +540,7 @@ class NotebookTest(unittest.TestCase):
self
.
child1
.
destroy
()
self
.
child1
.
destroy
()
self
.
child2
.
destroy
()
self
.
child2
.
destroy
()
self
.
nb
.
destroy
()
self
.
nb
.
destroy
()
support
.
root_withdraw
()
def
test_tab_identifiers
(
self
):
def
test_tab_identifiers
(
self
):
...
@@ -708,13 +720,12 @@ class NotebookTest(unittest.TestCase):
...
@@ -708,13 +720,12 @@ class NotebookTest(unittest.TestCase):
class
TreeviewTest
(
unittest
.
TestCase
):
class
TreeviewTest
(
unittest
.
TestCase
):
def
setUp
(
self
):
def
setUp
(
self
):
s
elf
.
root
=
support
.
get_tk_root
()
s
upport
.
root_deiconify
()
self
.
tv
=
ttk
.
Treeview
(
self
.
root
)
self
.
tv
=
ttk
.
Treeview
()
def
tearDown
(
self
):
def
tearDown
(
self
):
self
.
tv
.
destroy
()
self
.
tv
.
destroy
()
self
.
root
.
update_idletasks
()
support
.
root_withdraw
()
self
.
root
.
destroy
()
def
test_bbox
(
self
):
def
test_bbox
(
self
):
...
...
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