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
2028e013
Kaydet (Commit)
2028e013
authored
Kas 04, 2013
tarafından
Serhiy Storchaka
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #19085: Fix running test_ttk_textonly on displayless host.
üst
8d8599ce
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
9 deletions
+16
-9
test_widgets.py
Lib/tkinter/test/test_tkinter/test_widgets.py
+3
-2
widget_tests.py
Lib/tkinter/test/widget_tests.py
+13
-7
No files found.
Lib/tkinter/test/test_tkinter/test_widgets.py
Dosyayı görüntüle @
2028e013
...
@@ -4,7 +4,8 @@ import os
...
@@ -4,7 +4,8 @@ import os
from
test.support
import
requires
from
test.support
import
requires
from
tkinter.test.support
import
tcl_version
,
requires_tcl
,
widget_eq
from
tkinter.test.support
import
tcl_version
,
requires_tcl
,
widget_eq
from
tkinter.test.widget_tests
import
(
add_standard_options
,
noconv
,
from
tkinter.test.widget_tests
import
(
add_standard_options
,
noconv
,
pixels_round
,
AbstractWidgetTest
,
StandardOptionsTests
,
IntegerSizeTests
,
PixelSizeTests
)
AbstractWidgetTest
,
StandardOptionsTests
,
IntegerSizeTests
,
PixelSizeTests
)
requires
(
'gui'
)
requires
(
'gui'
)
...
@@ -243,7 +244,7 @@ class MenubuttonTest(AbstractLabelTest, unittest.TestCase):
...
@@ -243,7 +244,7 @@ class MenubuttonTest(AbstractLabelTest, unittest.TestCase):
'takefocus'
,
'text'
,
'textvariable'
,
'takefocus'
,
'text'
,
'textvariable'
,
'underline'
,
'width'
,
'wraplength'
,
'underline'
,
'width'
,
'wraplength'
,
)
)
_conv_pixels
=
AbstractWidgetTest
.
_conv_pixels
_conv_pixels
=
staticmethod
(
pixels_round
)
def
_create
(
self
,
**
kwargs
):
def
_create
(
self
,
**
kwargs
):
return
tkinter
.
Menubutton
(
self
.
root
,
**
kwargs
)
return
tkinter
.
Menubutton
(
self
.
root
,
**
kwargs
)
...
...
Lib/tkinter/test/widget_tests.py
Dosyayı görüntüle @
2028e013
...
@@ -12,18 +12,24 @@ pixels_round = round
...
@@ -12,18 +12,24 @@ pixels_round = round
if
tcl_version
[:
2
]
==
(
8
,
5
):
if
tcl_version
[:
2
]
==
(
8
,
5
):
# Issue #19085: Workaround a bug in Tk
# Issue #19085: Workaround a bug in Tk
# http://core.tcl.tk/tk/info/3497848
# http://core.tcl.tk/tk/info/3497848
root
=
setup_master
()
_pixels_round
=
None
patchlevel
=
root
.
call
(
'info'
,
'patchlevel'
)
def
pixels_round
(
x
):
patchlevel
=
tuple
(
map
(
int
,
patchlevel
.
split
(
'.'
)))
global
_pixels_round
if
patchlevel
<
(
8
,
5
,
12
):
if
_pixels_round
is
None
:
pixels_round
=
int
root
=
setup_master
()
del
root
patchlevel
=
root
.
call
(
'info'
,
'patchlevel'
)
patchlevel
=
tuple
(
map
(
int
,
patchlevel
.
split
(
'.'
)))
if
patchlevel
<
(
8
,
5
,
12
):
_pixels_round
=
int
else
:
_pixels_round
=
int_round
return
_pixels_round
(
x
)
_sentinel
=
object
()
_sentinel
=
object
()
class
AbstractWidgetTest
:
class
AbstractWidgetTest
:
_conv_pixels
=
pixels_round
_conv_pixels
=
staticmethod
(
pixels_round
)
_conv_pad_pixels
=
None
_conv_pad_pixels
=
None
wantobjects
=
True
wantobjects
=
True
...
...
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