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
31b9c845
Kaydet (Commit)
31b9c845
authored
Kas 03, 2013
tarafından
Serhiy Storchaka
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #6157: Fixed Tkinter.Text.debug(). Original patch by Guilherme Polo.
üst
8630f16e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
2 deletions
+29
-2
Tkinter.py
Lib/lib-tk/Tkinter.py
+3
-2
test_text.py
Lib/lib-tk/test/test_tkinter/test_text.py
+11
-0
test_widgets.py
Lib/lib-tk/test/test_tkinter/test_widgets.py
+13
-0
NEWS
Misc/NEWS
+2
-0
No files found.
Lib/lib-tk/Tkinter.py
Dosyayı görüntüle @
31b9c845
...
@@ -2908,8 +2908,9 @@ class Text(Widget, XView, YView):
...
@@ -2908,8 +2908,9 @@ class Text(Widget, XView, YView):
def
debug
(
self
,
boolean
=
None
):
def
debug
(
self
,
boolean
=
None
):
"""Turn on the internal consistency checks of the B-Tree inside the text
"""Turn on the internal consistency checks of the B-Tree inside the text
widget according to BOOLEAN."""
widget according to BOOLEAN."""
return
self
.
tk
.
getboolean
(
self
.
tk
.
call
(
if
boolean
is
None
:
self
.
_w
,
'debug'
,
boolean
))
return
self
.
tk
.
call
(
self
.
_w
,
'debug'
)
self
.
tk
.
call
(
self
.
_w
,
'debug'
,
boolean
)
def
delete
(
self
,
index1
,
index2
=
None
):
def
delete
(
self
,
index1
,
index2
=
None
):
"""Delete the characters between INDEX1 and INDEX2 (not included)."""
"""Delete the characters between INDEX1 and INDEX2 (not included)."""
self
.
tk
.
call
(
self
.
_w
,
'delete'
,
index1
,
index2
)
self
.
tk
.
call
(
self
.
_w
,
'delete'
,
index1
,
index2
)
...
...
Lib/lib-tk/test/test_tkinter/test_text.py
Dosyayı görüntüle @
31b9c845
...
@@ -14,6 +14,17 @@ class TextTest(unittest.TestCase):
...
@@ -14,6 +14,17 @@ class TextTest(unittest.TestCase):
def
tearDown
(
self
):
def
tearDown
(
self
):
self
.
text
.
destroy
()
self
.
text
.
destroy
()
def
test_debug
(
self
):
text
=
self
.
text
olddebug
=
text
.
debug
()
try
:
text
.
debug
(
0
)
self
.
assertEqual
(
text
.
debug
(),
0
)
text
.
debug
(
1
)
self
.
assertEqual
(
text
.
debug
(),
1
)
finally
:
text
.
debug
(
olddebug
)
self
.
assertEqual
(
text
.
debug
(),
olddebug
)
def
test_search
(
self
):
def
test_search
(
self
):
text
=
self
.
text
text
=
self
.
text
...
...
Lib/lib-tk/test/test_tkinter/test_widgets.py
Dosyayı görüntüle @
31b9c845
...
@@ -607,6 +607,19 @@ class TextTest(AbstractWidgetTest, unittest.TestCase):
...
@@ -607,6 +607,19 @@ class TextTest(AbstractWidgetTest, unittest.TestCase):
else
:
else
:
self
.
checkEnumParam
(
widget
,
'wrap'
,
'char'
,
'none'
,
'word'
)
self
.
checkEnumParam
(
widget
,
'wrap'
,
'char'
,
'none'
,
'word'
)
def
test_bbox
(
self
):
widget
=
self
.
create
()
bbox
=
widget
.
bbox
(
'1.1'
)
self
.
assertEqual
(
len
(
bbox
),
4
)
for
item
in
bbox
:
self
.
assertIsInstance
(
item
,
int
)
self
.
assertIsNone
(
widget
.
bbox
(
'end'
))
self
.
assertRaises
(
Tkinter
.
TclError
,
widget
.
bbox
,
'noindex'
)
self
.
assertRaises
(
Tkinter
.
TclError
,
widget
.
bbox
,
None
)
self
.
assertRaises
(
Tkinter
.
TclError
,
widget
.
bbox
)
self
.
assertRaises
(
Tkinter
.
TclError
,
widget
.
bbox
,
'1.1'
,
'end'
)
@add_standard_options
(
PixelSizeTests
,
StandardOptionsTests
)
@add_standard_options
(
PixelSizeTests
,
StandardOptionsTests
)
class
CanvasTest
(
AbstractWidgetTest
,
unittest
.
TestCase
):
class
CanvasTest
(
AbstractWidgetTest
,
unittest
.
TestCase
):
...
...
Misc/NEWS
Dosyayı görüntüle @
31b9c845
...
@@ -12,6 +12,8 @@ Core and Builtins
...
@@ -12,6 +12,8 @@ Core and Builtins
Library
Library
-------
-------
- Issue #6157: Fixed Tkinter.Text.debug(). Original patch by Guilherme Polo.
- Issue #6160: The bbox() method of tkinter.Spinbox now returns a tuple of
- Issue #6160: The bbox() method of tkinter.Spinbox now returns a tuple of
integers instead of a string. Based on patch by Guilherme Polo.
integers instead of a string. Based on patch by Guilherme Polo.
...
...
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