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
7c28999c
Kaydet (Commit)
7c28999c
authored
Kas 07, 2014
tarafından
Serhiy Storchaka
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Issue #22769: Fixed ttk.Treeview.tag_has() when called without arguments.
üst
9f2e0d6a
8e92f572
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
2 deletions
+23
-2
test_widgets.py
Lib/tkinter/test/test_ttk/test_widgets.py
+16
-1
ttk.py
Lib/tkinter/ttk.py
+5
-1
NEWS
Misc/NEWS
+2
-0
No files found.
Lib/tkinter/test/test_ttk/test_widgets.py
Dosyayı görüntüle @
7c28999c
import
unittest
import
tkinter
from
tkinter
import
ttk
from
tkinter
import
ttk
,
TclError
from
test.support
import
requires
import
sys
...
...
@@ -1563,6 +1563,21 @@ class TreeviewTest(AbstractWidgetTest, unittest.TestCase):
'blue'
)
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
)
class
SeparatorTest
(
AbstractWidgetTest
,
unittest
.
TestCase
):
...
...
Lib/tkinter/ttk.py
Dosyayı görüntüle @
7c28999c
...
...
@@ -1456,7 +1456,11 @@ class Treeview(Widget, tkinter.XView, tkinter.YView):
all items which have the specified tag.
* 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
))
...
...
Misc/NEWS
Dosyayı görüntüle @
7c28999c
...
...
@@ -183,6 +183,8 @@ Core and Builtins
Library
-------
-
Issue
#
22769
:
Fixed
ttk
.
Treeview
.
tag_has
()
when
called
without
arguments
.
-
Issue
#
22417
:
Verify
certificates
by
default
in
httplib
(
PEP
476
).
-
Issue
#
22775
:
Fixed
unpickling
of
http
.
cookies
.
SimpleCookie
with
protocol
2
...
...
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