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
7a025823
Kaydet (Commit)
7a025823
authored
Kas 07, 2014
tarafından
Serhiy Storchaka
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #22769: Fixed ttk.Treeview.tag_has() when called without arguments.
üst
a6a8a4f5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
1 deletion
+23
-1
test_widgets.py
Lib/lib-tk/test/test_ttk/test_widgets.py
+16
-0
ttk.py
Lib/lib-tk/ttk.py
+5
-1
NEWS
Misc/NEWS
+2
-0
No files found.
Lib/lib-tk/test/test_ttk/test_widgets.py
Dosyayı görüntüle @
7a025823
import
unittest
import
unittest
import
Tkinter
as
tkinter
import
Tkinter
as
tkinter
from
Tkinter
import
TclError
import
ttk
import
ttk
from
test.test_support
import
requires
,
run_unittest
from
test.test_support
import
requires
,
run_unittest
import
sys
import
sys
...
@@ -1564,6 +1565,21 @@ class TreeviewTest(AbstractWidgetTest, unittest.TestCase):
...
@@ -1564,6 +1565,21 @@ class TreeviewTest(AbstractWidgetTest, unittest.TestCase):
'blue'
)
'blue'
)
self
.
assertIsInstance
(
self
.
tv
.
tag_configure
(
'test'
),
dict
)
self
.
assertIsInstance
(
self
.
tv
.
tag_configure
(
'test'
),
dict
)
def
test_tag_has
(
self
):
item1
=
self
.
tv
.
insert
(
''
,
'end'
,
text
=
'Item 1'
,
tags
=
[
'tag1'
])
item2
=
self
.
tv
.
insert
(
''
,
'end'
,
text
=
'Item 2'
,
tags
=
[
'tag2'
])
self
.
assertRaises
(
TypeError
,
self
.
tv
.
tag_has
)
self
.
assertRaises
(
TclError
,
self
.
tv
.
tag_has
,
'tag1'
,
'non-existing'
)
self
.
assertTrue
(
self
.
tv
.
tag_has
(
'tag1'
,
item1
))
self
.
assertFalse
(
self
.
tv
.
tag_has
(
'tag1'
,
item2
))
self
.
assertFalse
(
self
.
tv
.
tag_has
(
'tag2'
,
item1
))
self
.
assertTrue
(
self
.
tv
.
tag_has
(
'tag2'
,
item2
))
self
.
assertFalse
(
self
.
tv
.
tag_has
(
'tag3'
,
item1
))
self
.
assertFalse
(
self
.
tv
.
tag_has
(
'tag3'
,
item2
))
self
.
assertEqual
(
self
.
tv
.
tag_has
(
'tag1'
),
(
item1
,))
self
.
assertEqual
(
self
.
tv
.
tag_has
(
'tag2'
),
(
item2
,))
self
.
assertEqual
(
self
.
tv
.
tag_has
(
'tag3'
),
())
@add_standard_options
(
StandardTtkOptionsTests
)
@add_standard_options
(
StandardTtkOptionsTests
)
class
SeparatorTest
(
AbstractWidgetTest
,
unittest
.
TestCase
):
class
SeparatorTest
(
AbstractWidgetTest
,
unittest
.
TestCase
):
...
...
Lib/lib-tk/ttk.py
Dosyayı görüntüle @
7a025823
...
@@ -1458,7 +1458,11 @@ class Treeview(Widget, Tkinter.XView, Tkinter.YView):
...
@@ -1458,7 +1458,11 @@ class Treeview(Widget, Tkinter.XView, Tkinter.YView):
all items which have the specified tag.
all items which have the specified tag.
* Availability: Tk 8.6"""
* Availability: Tk 8.6"""
return
self
.
tk
.
getboolean
(
if
item
is
None
:
return
self
.
tk
.
splitlist
(
self
.
tk
.
call
(
self
.
_w
,
"tag"
,
"has"
,
tagname
))
else
:
return
self
.
tk
.
getboolean
(
self
.
tk
.
call
(
self
.
_w
,
"tag"
,
"has"
,
tagname
,
item
))
self
.
tk
.
call
(
self
.
_w
,
"tag"
,
"has"
,
tagname
,
item
))
...
...
Misc/NEWS
Dosyayı görüntüle @
7a025823
...
@@ -37,6 +37,8 @@ Core and Builtins
...
@@ -37,6 +37,8 @@ Core and Builtins
Library
Library
-------
-------
-
Issue
#
22769
:
Fixed
ttk
.
Treeview
.
tag_has
()
when
called
without
arguments
.
-
Issue
#
22787
:
Allow
the
keyfile
argument
of
SSLContext
.
load_cert_chain
to
be
-
Issue
#
22787
:
Allow
the
keyfile
argument
of
SSLContext
.
load_cert_chain
to
be
None
.
None
.
...
...
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