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
dd808169
Kaydet (Commit)
dd808169
authored
Kas 02, 2013
tarafından
Serhiy Storchaka
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #19085: Added basic tests for all tkinter widget options.
üst
a40f5b51
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
42 additions
and
0 deletions
+42
-0
test_widgets.py
Lib/lib-tk/test/test_tkinter/test_widgets.py
+0
-0
support.py
Lib/lib-tk/test/test_ttk/support.py
+40
-0
test_widgets.py
Lib/lib-tk/test/test_ttk/test_widgets.py
+0
-0
widget_tests.py
Lib/lib-tk/test/widget_tests.py
+0
-0
NEWS
Misc/NEWS
+2
-0
No files found.
Lib/lib-tk/test/test_tkinter/test_widgets.py
0 → 100644
Dosyayı görüntüle @
dd808169
This diff is collapsed.
Click to expand it.
Lib/lib-tk/test/test_ttk/support.py
Dosyayı görüntüle @
dd808169
import
unittest
import
Tkinter
import
Tkinter
def
get_tk_root
():
def
get_tk_root
():
...
@@ -31,3 +32,42 @@ def simulate_mouse_click(widget, x, y):
...
@@ -31,3 +32,42 @@ def simulate_mouse_click(widget, x, y):
widget
.
event_generate
(
'<Motion>'
,
x
=
x
,
y
=
y
)
widget
.
event_generate
(
'<Motion>'
,
x
=
x
,
y
=
y
)
widget
.
event_generate
(
'<ButtonPress-1>'
,
x
=
x
,
y
=
y
)
widget
.
event_generate
(
'<ButtonPress-1>'
,
x
=
x
,
y
=
y
)
widget
.
event_generate
(
'<ButtonRelease-1>'
,
x
=
x
,
y
=
y
)
widget
.
event_generate
(
'<ButtonRelease-1>'
,
x
=
x
,
y
=
y
)
import
_tkinter
tcl_version
=
tuple
(
map
(
int
,
_tkinter
.
TCL_VERSION
.
split
(
'.'
)))
def
requires_tcl
(
*
version
):
return
unittest
.
skipUnless
(
tcl_version
>=
version
,
'requires Tcl version >= '
+
'.'
.
join
(
map
(
str
,
version
)))
units
=
{
'c'
:
72
/
2.54
,
# centimeters
'i'
:
72
,
# inches
'm'
:
72
/
25.4
,
# millimeters
'p'
:
1
,
# points
}
def
pixels_conv
(
value
):
return
float
(
value
[:
-
1
])
*
units
[
value
[
-
1
:]]
def
tcl_obj_eq
(
actual
,
expected
):
if
actual
==
expected
:
return
True
if
isinstance
(
actual
,
_tkinter
.
Tcl_Obj
):
if
isinstance
(
expected
,
str
):
return
str
(
actual
)
==
expected
if
isinstance
(
actual
,
tuple
):
if
isinstance
(
expected
,
tuple
):
return
(
len
(
actual
)
==
len
(
expected
)
and
all
(
tcl_obj_eq
(
act
,
exp
)
for
act
,
exp
in
zip
(
actual
,
expected
)))
return
False
def
widget_eq
(
actual
,
expected
):
if
actual
==
expected
:
return
True
if
isinstance
(
actual
,
(
str
,
Tkinter
.
Widget
)):
if
isinstance
(
expected
,
(
str
,
Tkinter
.
Widget
)):
return
str
(
actual
)
==
str
(
expected
)
return
False
Lib/lib-tk/test/test_ttk/test_widgets.py
Dosyayı görüntüle @
dd808169
This diff is collapsed.
Click to expand it.
Lib/lib-tk/test/widget_tests.py
0 → 100644
Dosyayı görüntüle @
dd808169
This diff is collapsed.
Click to expand it.
Misc/NEWS
Dosyayı görüntüle @
dd808169
...
@@ -15,6 +15,8 @@ Library
...
@@ -15,6 +15,8 @@ Library
Tests
Tests
-----
-----
- Issue #19085: Added basic tests for all tkinter widget options.
Whats'
New
in
Python
2.7.6
?
Whats'
New
in
Python
2.7.6
?
===========================
===========================
...
...
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