Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
2f26c224
Commit
2f26c224
authored
Jan 11, 2014
by
Serhiy Storchaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tkinter.Text.debug() now always returns 0/1.
Fixed a regression inroduced in issue #6157.
parent
02d5db27
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
4 deletions
+3
-4
Lib/tkinter/__init__.py
Lib/tkinter/__init__.py
+1
-1
Lib/tkinter/test/test_tkinter/test_text.py
Lib/tkinter/test/test_tkinter/test_text.py
+2
-3
No files found.
Lib/tkinter/__init__.py
View file @
2f26c224
...
...
@@ -3002,7 +3002,7 @@ class Text(Widget, XView, YView):
"""Turn on the internal consistency checks of the B-Tree inside the text
widget according to BOOLEAN."""
if boolean is None:
return self.tk.
call(self._w, 'debug'
)
return self.tk.
getboolean(self.tk.call(self._w, 'debug')
)
self.tk.call(self._w, 'debug', boolean)
def delete(self, index1, index2=None):
"""Delete the characters between INDEX1 and INDEX2 (not included)."""
...
...
Lib/tkinter/test/test_tkinter/test_text.py
View file @
2f26c224
...
...
@@ -16,13 +16,12 @@ class TextTest(unittest.TestCase):
def
test_debug
(
self
):
text
=
self
.
text
wantobjects
=
self
.
root
.
wantobjects
()
olddebug
=
text
.
debug
()
try
:
text
.
debug
(
0
)
self
.
assertEqual
(
text
.
debug
(),
0
if
wantobjects
else
'0'
)
self
.
assertEqual
(
text
.
debug
(),
0
)
text
.
debug
(
1
)
self
.
assertEqual
(
text
.
debug
(),
1
if
wantobjects
else
'1'
)
self
.
assertEqual
(
text
.
debug
(),
1
)
finally
:
text
.
debug
(
olddebug
)
self
.
assertEqual
(
text
.
debug
(),
olddebug
)
...
...
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